/* White Nile - Main Styles */

/* Custom scrollbar */
::-webkit-scrollbar {
    width: 8px;
    height: 8px;
}

::-webkit-scrollbar-track {
    background: #f1f1f1;
}

::-webkit-scrollbar-thumb {
    background: #c1c1c1;
    border-radius: 4px;
}

::-webkit-scrollbar-thumb:hover {
    background: #a1a1a1;
}

/* Range slider custom styling */
input[type="range"] {
    -webkit-appearance: none;
    appearance: none;
    background: transparent;
}

input[type="range"]::-webkit-slider-track {
    background: #e5e7eb;
    height: 8px;
    border-radius: 4px;
}

input[type="range"]::-webkit-slider-thumb {
    -webkit-appearance: none;
    appearance: none;
    width: 24px;
    height: 24px;
    background: #1132d4;
    border-radius: 50%;
    cursor: pointer;
    margin-top: -8px;
    box-shadow: 0 2px 6px rgba(17, 50, 212, 0.3);
}

input[type="range"]::-moz-range-track {
    background: #e5e7eb;
    height: 8px;
    border-radius: 4px;
}

input[type="range"]::-moz-range-thumb {
    width: 24px;
    height: 24px;
    background: #1132d4;
    border-radius: 50%;
    cursor: pointer;
    border: none;
    box-shadow: 0 2px 6px rgba(17, 50, 212, 0.3);
}

/* Focus states */
input:focus,
textarea:focus,
select:focus {
    outline: none;
    box-shadow: 0 0 0 3px rgba(17, 50, 212, 0.15);
}

/* Button hover effect */
button,
a {
    transition: all 0.2s ease;
}

/* Smooth animations */
.transition-all {
    transition-property: all;
    transition-timing-function: cubic-bezier(0.4, 0, 0.2, 1);
    transition-duration: 200ms;
}

/* HTMX loading indicator */
.htmx-request .htmx-indicator {
    opacity: 1;
}

.htmx-indicator {
    opacity: 0;
    transition: opacity 200ms ease-in;
}

/* Loading spinner */
.spinner {
    animation: spin 1s linear infinite;
}

@keyframes spin {
    from {
        transform: rotate(0deg);
    }
    to {
        transform: rotate(360deg);
    }
}

/* Prose styles for terms content */
.prose h2 {
    font-size: 1.5rem;
    font-weight: 700;
    margin-top: 2rem;
    margin-bottom: 1rem;
    color: #111827;
}

.prose h3 {
    font-size: 1.25rem;
    font-weight: 600;
    margin-top: 1.5rem;
    margin-bottom: 0.75rem;
    color: #1f2937;
}

.prose p {
    margin-bottom: 1rem;
    line-height: 1.75;
    color: #4b5563;
}

.prose ul,
.prose ol {
    margin-bottom: 1rem;
    padding-left: 1.5rem;
}

.prose li {
    margin-bottom: 0.5rem;
    color: #4b5563;
}

.prose a {
    color: #1132d4;
    text-decoration: underline;
}

.prose a:hover {
    color: #0d2490;
}

/* Modal styles */
#modal {
    opacity: 0;
    visibility: hidden;
    transition: opacity 0.3s ease, visibility 0.3s ease;
}

#modal:not(.hidden) {
    opacity: 1;
    visibility: visible;
}

#modal .modal-content {
    transform: translate(-50%, -50%) scale(0.95);
    transition: transform 0.3s ease;
}

#modal:not(.hidden) .modal-content {
    transform: translate(-50%, -50%) scale(1);
}

.qq-dimmed {
    opacity: 0.6;
    pointer-events: none;
    transition: opacity 0.2s ease;
}

#quick-quote-form .qq-invalid {
    border-color: #ef4444 !important;
}

#quick-quote-form input[type="checkbox"].qq-invalid {
    outline: 2px solid #ef4444;
    outline-offset: 2px;
}

#quick-quote-success-overlay .qq-success-card {
    opacity: 0;
    transform: scale(0.95);
    transition: opacity 0.2s ease, transform 0.2s ease;
}

#quick-quote-success-overlay.qq-active .qq-success-card {
    opacity: 1;
    transform: scale(1);
}

@media (max-width: 640px) {
    #quick-quote-success-overlay .qq-success-card {
        width: 100%;
    }
}

@media (prefers-reduced-motion: reduce) {
    #quick-quote-success-overlay .qq-success-card,
    .qq-dimmed {
        transition: none;
    }
}

/* Reduce motion for accessibility */
@media (prefers-reduced-motion: reduce) {
    *,
    ::before,
    ::after {
        animation-duration: 0.01ms !important;
        animation-iteration-count: 1 !important;
        transition-duration: 0.01ms !important;
        scroll-behavior: auto !important;
    }
}

/* Print styles */
@media print {
    header,
    footer,
    .no-print {
        display: none !important;
    }

    body {
        font-size: 12pt;
        line-height: 1.5;
    }

    a {
        text-decoration: none;
        color: inherit;
    }
}

/* Mobile menu layout */
#mobile-menu {
    max-height: none;
    height: 100vh;
    overflow-y: auto;
    -webkit-overflow-scrolling: touch;
}

/* Hide scrollbars utility */
.no-scrollbar {
    -ms-overflow-style: none; /* IE and Edge */
    scrollbar-width: none; /* Firefox */
}
.no-scrollbar::-webkit-scrollbar {
    display: none; /* Chrome, Safari */
    width: 0;
    height: 0;
}

/* Prevent filter tab text wrapping */
.filter-btn {
    white-space: nowrap;
}

/* Table responsive */
@media (max-width: 768px) {
    .table-responsive {
        overflow-x: auto;
        -webkit-overflow-scrolling: touch;
    }
}

/* Form validation styles */
input:invalid:not(:placeholder-shown),
textarea:invalid:not(:placeholder-shown) {
    border-color: #ef4444;
}

input:valid:not(:placeholder-shown),
textarea:valid:not(:placeholder-shown) {
    border-color: #1132d4;
}

/* Selection color */
::selection {
    background-color: #1132d4;
    color: white;
}

/* Placeholder color */
::placeholder {
    color: #9ca3af;
    opacity: 1;
}
