
/* Common Validation Styles */
.form-group {
    position: relative;
    margin-bottom: 20px;
}

.form-control.error,
.billing_input_box input.error {
    border-color: #dc3545 !important;
    box-shadow: 0 0 0 0.2rem rgba(220, 53, 69, 0.25);
}

.error-message {
    color: #dc3545;
    font-size: 12px;
    margin-top: 5px;
    display: none;
    font-weight: 500;
}

.error-message.show {
    display: block;
}

.invalid-feedback.d-block {
    color: #dc3545;
    font-size: 12px;
    margin-top: 5px;
    font-weight: 500;
}

/* Toast Notification Styles - Consistent across all pages */
.toast-container {
    position: fixed !important;
    top: 20px !important;
    right: 20px !important;
    z-index: 99999 !important;
    pointer-events: none;
}

.toast {
    background: #28a745 !important;
    color: #fff !important;
    padding: 15px 20px !important;
    border-radius: 8px !important;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15) !important;
    display: flex !important;
    align-items: center !important;
    gap: 10px !important;
    min-width: 300px !important;
    animation: slideIn 0.3s ease !important;
    margin-bottom: 10px !important;
    pointer-events: auto;
    font-family: inherit !important;
    font-size: 14px !important;
    line-height: 1.4 !important;
    border: none !important;
}

.toast.error {
    background: #dc3545 !important;
}

.toast.warning {
    background: #ffc107 !important;
    color: #212529 !important;
}

.toast.info {
    background: #17a2b8 !important;
}

.toast.success {
    background: #28a745 !important;
}

.toast.show {
    display: flex !important;
}

.toast.hide {
    animation: slideOut 0.3s ease forwards !important;
}

@keyframes slideIn {
    from { transform: translateX(100%); opacity: 0; }
    to { transform: translateX(0); opacity: 1; }
}

@keyframes slideOut {
    from { transform: translateX(0); opacity: 1; }
    to { transform: translateX(100%); opacity: 0; }
}

.toast-icon {
    font-size: 20px !important;
    flex-shrink: 0 !important;
}

.toast-message {
    flex: 1 !important;
    font-weight: 500 !important;
    margin: 0 !important;
    padding: 0 !important;
}

.toast-close {
    background: none !important;
    border: none !important;
    color: inherit !important;
    font-size: 18px !important;
    cursor: pointer !important;
    padding: 0 !important;
    width: 20px !important;
    height: 20px !important;
    display: flex !important;
    align-items: center !important;
    justify-content: center !important;
    flex-shrink: 0 !important;
    opacity: 0.8 !important;
}

.toast-close:hover {
    opacity: 1 !important;
}

/* Mobile Responsive - Consistent toast design */
@media (max-width: 768px) {
    .toast {
        min-width: auto !important;
        width: calc(100vw - 40px) !important;
        margin: 0 20px 10px 20px !important;
        max-width: none !important;
    }

    .toast-container {
        right: 0 !important;
        left: 0 !important;
        top: 20px !important;
    }

    .toast-message {
        font-size: 13px !important;
    }
}

/* Input Focus States */
.form-control:focus,
.billing_input_box input:focus {
    border-color: var(--reroof-base, #006dff);
    box-shadow: 0 0 0 0.2rem rgba(0, 109, 255, 0.25);
}

/* Password Toggle - Only show for password fields, not for required validation */
.password-toggle {
    position: absolute;
    right: 15px;
    top: 50%;
    transform: translateY(-50%);
    cursor: pointer;
    color: #666;
    z-index: 10;
}

.password-toggle:hover {
    color: var(--reroof-base, #006dff);
}

/* Hide ALL validation icons - only show border colors */
.form-control + .validation-icon,
.billing_input_box input + .validation-icon,
.form-control + i:not(.password-toggle),
.billing_input_box input + i:not(.password-toggle),
.input-box input + i:not(.password-toggle),
.form-group input + i:not(.password-toggle) {
    display: none !important;
}

/* Hide success/error icons */
.form-control + .fa:not(.password-toggle),
.billing_input_box input + .fa:not(.password-toggle),
.input-box input + .fa:not(.password-toggle),
.form-group input + .fa:not(.password-toggle) {
    display: none !important;
}

/* Hide any validation feedback icons */
.valid-feedback::before,
.invalid-feedback::before,
.form-control.is-valid::after,
.form-control.is-invalid::after {
    display: none !important;
}

/* Only show password toggle icons */
input[type="password"] + .password-toggle,
input[type="password"] + i.password-toggle,
input[type="password"] + .fa.password-toggle {
    display: block !important;
}

/* Success state - only green border */
.form-control.valid,
.billing_input_box input.valid,
.input-box input.valid {
    border-color: #28a745 !important;
    box-shadow: 0 0 0 0.2rem rgba(40, 167, 69, 0.25) !important;
}

/* Error state - only red border */
.form-control.error,
.billing_input_box input.error,
.input-box input.error {
    border-color: #dc3545 !important;
    box-shadow: 0 0 0 0.2rem rgba(220, 53, 69, 0.25) !important;
}

/* Remove Bootstrap validation icons */
.was-validated .form-control:valid,
.was-validated .form-control:invalid {
    background-image: none !important;
    padding-right: 0.75rem !important;
}

/* Hide any other validation icons */
.form-control::after,
.form-control::before {
    display: none !important;
}

/* Hide all possible validation icons globally */
input + .icon:not(.password-toggle),
input + span.icon:not(.password-toggle),
input + div.icon:not(.password-toggle) {
    display: none !important;
}

/* Force hide any success/error indicators */
.form-feedback,
.valid-tooltip,
.invalid-tooltip {
    display: none !important;
}

/* Ensure no background images for validation */
input.form-control,
.billing_input_box input,
.input-box input {
    background-image: none !important;
}

/* Hide contact form icons specifically */
.contact-page__form .input-box .icon {
    display: none !important;
}