/*----------------------------------------------------
* Contact Form Styling and Toast Notifications
* MANVI INTERNATIONAL
====================================================================*/

/* Toast Notification Styles */
.toast-container {
    z-index: 9999;
    max-width: 350px;
}

.toast {
    min-width: 300px;
    max-width: 350px;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
    border-radius: 8px;
    margin-bottom: 10px;
    display: block !important;
    visibility: visible;
}

.toast-header {
    border-radius: 8px 8px 0 0;
    font-weight: 600;
}

.toast-body {
    padding: 12px 16px;
    font-size: 14px;
}

.bg-success {
    background-color: #28a745 !important;
}

.bg-danger {
    background-color: #dc3545 !important;
}

/* Ensure toast is visible */
.toast.show {
    opacity: 1 !important;
    visibility: visible !important;
}

.toast:not(.show) {
    opacity: 0;
}

/* Form Validation Styles */
.comment-form__input-box {
    position: relative;
}

.comment-form__input-box input.is-invalid,
.comment-form__input-box textarea.is-invalid {
    border-color: #dc3545;
    padding-right: calc(1.5em + 0.75rem);
    background-image: url("data:image/svg+xml,%3csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 12 12' width='12' height='12' fill='none' stroke='%23dc3545'%3e%3ccircle cx='6' cy='6' r='4.5'/%3e%3cpath d='m5.8 3.6 .4.4.4-.4m0 4.8-.4-.4-.4.4'/%3e%3c/svg%3e");
    background-repeat: no-repeat;
    background-position: right calc(0.375em + 0.1875rem) center;
    background-size: calc(0.75em + 0.375rem) calc(0.75em + 0.375rem);
}

.comment-form__input-box input.is-valid,
.comment-form__input-box textarea.is-valid {
    border-color: #28a745;
    padding-right: calc(1.5em + 0.75rem);
    background-image: url("data:image/svg+xml,%3csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 8 8'%3e%3cpath fill='%2328a745' d='M2.3 6.73L.6 4.53c-.4-1.04.46-1.4 1.1-.8l1.1 1.4 3.4-3.8c.6-.63 1.6-.27 1.2.7l-4 4.6c-.43.5-.8.4-1.1.1z'/%3e%3c/svg%3e");
    background-repeat: no-repeat;
    background-position: right calc(0.375em + 0.1875rem) center;
    background-size: calc(0.75em + 0.375rem) calc(0.75em + 0.375rem);
}

.invalid-feedback {
    display: none;
    width: 100%;
    margin-top: 0.25rem;
    font-size: 0.875em;
    color: #dc3545;
}

.invalid-feedback.show {
    display: block;
}

/* Button Loading State */
.comment-form__btn {
    position: relative;
    min-height: 50px;
}

.comment-form__btn:disabled {
    opacity: 0.7;
    cursor: not-allowed;
}

.spinner-border-sm {
    width: 1rem;
    height: 1rem;
    border-width: 0.15em;
}

/* Alert Styles Enhancement */
.alert {
    border-radius: 8px;
    margin-bottom: 20px;
}

.alert ul {
    padding-left: 20px;
    margin-top: 8px;
}

.alert ul li {
    margin-bottom: 5px;
}

/* Form Field Focus Enhancement */
.comment-form__input-box input:focus,
.comment-form__input-box textarea:focus {
    outline: none;
    border-color: var(--logi-base);
    box-shadow: 0 0 0 0.2rem rgba(255, 128, 0, 0.25);
}

/* Mobile Responsive Toast */
@media (max-width: 576px) {
    .toast-container {
        max-width: calc(100% - 20px);
        padding: 10px !important;
    }
    
    .toast {
        min-width: 100%;
        font-size: 14px;
    }
}

/* Smooth Transitions */
.comment-form__input-box input,
.comment-form__input-box textarea {
    transition: border-color 0.3s ease, box-shadow 0.3s ease;
}

/* Honeypot Field (Hidden) */
input[name="website"] {
    position: absolute !important;
    left: -9999px !important;
    opacity: 0 !important;
    pointer-events: none !important;
    visibility: hidden !important;
}

