/* Custom CSS for Phoenix Junk Removal Pros */

/* Loading Animation */
.loading-spinner {
    border: 3px solid rgba(255, 255, 255, 0.1);
    border-top-color: var(--terracotta);
    border-radius: 50%;
    width: 40px;
    height: 40px;
    animation: spin 1s linear infinite;
}

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

/* Smooth Scrolling for All Browsers */
html {
    scroll-behavior: smooth;
}

/* Enhanced Glass Effect for Safari */
@supports (-webkit-backdrop-filter: blur(20px)) {
    .glass-card {
        -webkit-backdrop-filter: blur(20px);
    }
}

/* Fallback for browsers without backdrop-filter support */
@supports not (backdrop-filter: blur(20px)) {
    .glass-card {
        background: rgba(31, 41, 55, 0.9);
    }
}

/* Custom Scrollbar */
::-webkit-scrollbar {
    width: 10px;
}

::-webkit-scrollbar-track {
    background: #1f2937;
}

::-webkit-scrollbar-thumb {
    background: var(--terracotta);
    border-radius: 5px;
}

::-webkit-scrollbar-thumb:hover {
    background: var(--terracotta-light);
}

/* Responsive Typography */
@media (max-width: 640px) {
    h1 {
        font-size: 2.5rem;
    }
    
    .glass-card p {
        font-size: 1rem;
    }
}

/* Video Background Overlay for Better Text Readability */
#video-bg::after {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: linear-gradient(
        to bottom,
        rgba(0, 0, 0, 0.3) 0%,
        rgba(0, 0, 0, 0.5) 100%
    );
    pointer-events: none;
}

/* Accessibility Improvements */
.nav-link:focus,
.cta-button:focus,
button:focus {
    outline: 2px solid var(--terracotta);
    outline-offset: 2px;
}

/* Skip to Main Content Link for Accessibility */
.skip-to-main {
    position: absolute;
    top: -40px;
    left: 0;
    background: var(--terracotta);
    color: white;
    padding: 8px;
    z-index: 100;
    text-decoration: none;
}

.skip-to-main:focus {
    top: 0;
}

/* Print Styles */
@media print {
    #video-bg,
    .glass-card {
        display: none;
    }
    
    body {
        background: white;
        color: black;
    }
}

/* Form Select Dropdown Styling - Readable black on white for options */
select[name="city"],
select[name="service"],
#quote-form select {
    /* Dark background for the select box itself */
    background-color: #1f2937 !important;
    color: #F2E8DC !important;
    border: 1px solid rgba(255, 255, 255, 0.2) !important;
    /* Remove default arrow */
    appearance: none !important;
    -webkit-appearance: none !important;
    -moz-appearance: none !important;
    /* Add custom arrow */
    background-image: url("data:image/svg+xml;charset=UTF-8,%3csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%23F2E8DC' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3e%3cpolyline points='6 9 12 15 18 9'%3e%3c/polyline%3e%3c/svg%3e") !important;
    background-repeat: no-repeat !important;
    background-position: right 0.5rem center !important;
    background-size: 1.5em 1.5em !important;
    padding-right: 2.5rem !important;
}

/* Force dropdown options to be black text on white background for readability */
select[name="city"] option,
select[name="service"] option,
#quote-form select option {
    background-color: white !important;
    color: black !important;
    padding: 8px !important;
}

/* Hover state for options */
select[name="city"] option:hover,
select[name="service"] option:hover,
#quote-form select option:hover,
select[name="city"] option:checked,
select[name="service"] option:checked,
#quote-form select option:checked {
    background-color: #D95F43 !important;
    color: white !important;
}

/* Focus state for select elements */
select:focus {
    outline: 2px solid #D95F43 !important;
    outline-offset: 2px;
    background-color: #1f2937 !important;
}

/* Performance Optimization - Reduce Motion */
@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;
    }
}