/* Custom styles for Clean Fix Build Pros website */

/* Range slider styling */
.slider {
    -webkit-appearance: none;
    appearance: none;
    background: #e2e8f0;
    outline: none;
    border-radius: 8px;
}

.slider::-webkit-slider-thumb {
    -webkit-appearance: none;
    appearance: none;
    width: 24px;
    height: 24px;
    background: #f4b400;
    cursor: pointer;
    border-radius: 50%;
    border: 2px solid white;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.2);
}

.slider::-moz-range-thumb {
    width: 24px;
    height: 24px;
    background: #f4b400;
    cursor: pointer;
    border-radius: 50%;
    border: 2px solid white;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.2);
}

/* Focus styles for accessibility */
button:focus,
input:focus,
select:focus,
textarea:focus {
    outline: 2px solid #f4b400;
    outline-offset: 2px;
}

/* Minimum touch target size for mobile accessibility */
button,
input[type="checkbox"],
input[type="radio"],
select {
    min-height: 44px;
    min-width: 44px;
}

/* FAQ toggle animation */
.faq-toggle .float-right {
    transition: transform 0.2s ease;
}

.faq-toggle.active .float-right {
    transform: rotate(45deg);
}

.faq-answer {
    animation: slideDown 0.3s ease;
}

@keyframes slideDown {
    from {
        opacity: 0;
        max-height: 0;
    }
    to {
        opacity: 1;
        max-height: 200px;
    }
}

/* Loading states */
.loading {
    position: relative;
    pointer-events: none;
    opacity: 0.7;
}

.loading::after {
    content: "";
    position: absolute;
    top: 50%;
    left: 50%;
    width: 20px;
    height: 20px;
    margin: -10px 0 0 -10px;
    border: 2px solid #f4b400;
    border-radius: 50%;
    border-top-color: transparent;
    animation: spin 1s linear infinite;
}

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

/* Success states */
.success-message {
    background-color: #dcfce7;
    border: 1px solid #16a34a;
    color: #15803d;
    padding: 1rem;
    border-radius: 0.5rem;
    margin-top: 1rem;
}

.error-message {
    background-color: #fef2f2;
    border: 1px solid #dc2626;
    color: #dc2626;
    padding: 1rem;
    border-radius: 0.5rem;
    margin-top: 1rem;
}

/* Modal backdrop animation */
#booking-modal,
#sms-modal {
    animation: fadeIn 0.3s ease;
}

#booking-modal > div,
#sms-modal > div {
    animation: slideUp 0.3s ease;
}

@keyframes fadeIn {
    from { opacity: 0; }
    to { opacity: 1; }
}

@keyframes slideUp {
    from {
        opacity: 0;
        transform: translateY(20px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* Smooth scrolling */
html {
    scroll-behavior: smooth;
}

/* High contrast mode support */
@media (prefers-contrast: high) {
    .bg-yellow-400 {
        background-color: #000000;
        color: #ffffff;
    }
    
    .text-yellow-400 {
        color: #000000;
    }
}

/* Reduced motion support */
@media (prefers-reduced-motion: reduce) {
    * {
        animation-duration: 0.01ms !important;
        animation-iteration-count: 1 !important;
        transition-duration: 0.01ms !important;
    }
    
    html {
        scroll-behavior: auto;
    }
}

/* Print styles */
@media print {
    .sticky,
    #sticky-cta,
    #booking-modal,
    #sms-modal {
        display: none !important;
    }
    
    body {
        background: white !important;
    }
}

/* Custom checkbox and radio button styling */
input[type="checkbox"],
input[type="radio"] {
    width: 18px;
    height: 18px;
    accent-color: #f4b400;
}

/* Logo styling - add white background for visibility on dark header */
.sticky.top-0 img {
    background-color: white;
    padding: 0.25rem 0.5rem;
    border-radius: 0.25rem;
}

/* Ensure proper spacing for mobile */
@media (max-width: 640px) {
    .container {
        padding-left: 1rem;
        padding-right: 1rem;
    }
    
    /* Hide desktop sticky CTA on mobile */
    #sticky-cta {
        display: none !important;
    }
    
    /* Stack form elements better on mobile */
    .grid.md\:grid-cols-2 {
        grid-template-columns: 1fr;
    }
    
    .grid.md\:grid-cols-3 {
        grid-template-columns: 1fr;
    }
    
    /* Stack header elements vertically on mobile */
    .sticky.top-0 > .container {
        flex-direction: column;
        align-items: center;
        text-align: center;
        gap: 0.5rem;
        padding-top: 0.5rem;
        padding-bottom: 0.5rem;
    }
    
    .sticky.top-0 a,
    .sticky.top-0 span {
        flex-shrink: 1;
    }
    
    .sticky.top-0 img {
        height: 1.25rem;
    }
}

/* Additional mobile optimizations */
@media (max-width: 480px) {
    h1 {
        font-size: 2rem !important;
        line-height: 1.2;
    }
    
    .text-xl {
        font-size: 1.125rem;
    }
    
    .py-16 {
        padding-top: 3rem;
        padding-bottom: 3rem;
    }
}

/* Price blur effect for curiosity */
.price-blur {
    filter: blur(15px);
    transition: filter 0.3s ease;
    user-select: none;
}

.price-blur.reveal {
    filter: none;
    user-select: auto;
}

/* Quote options modal animation */
#quote-options-modal {
    animation: fadeIn 0.3s ease;
}

#quote-options-modal > div {
    animation: slideUp 0.3s ease;
}

/* Glowing button effect for Get My Quote */
#get-quote-btn {
    animation: buttonGlow 2s ease-in-out infinite;
    box-shadow: 0 0 20px rgba(252, 211, 77, 0.5), 0 0 40px rgba(252, 211, 77, 0.3);
}

#get-quote-btn:hover {
    animation: buttonGlowHover 1.5s ease-in-out infinite;
    box-shadow: 0 0 30px rgba(252, 211, 77, 0.7), 0 0 60px rgba(252, 211, 77, 0.5);
}

@keyframes buttonGlow {
    0%, 100% {
        box-shadow: 0 0 20px rgba(252, 211, 77, 0.5), 0 0 40px rgba(252, 211, 77, 0.3);
    }
    50% {
        box-shadow: 0 0 30px rgba(252, 211, 77, 0.8), 0 0 60px rgba(252, 211, 77, 0.5);
    }
}

@keyframes buttonGlowHover {
    0%, 100% {
        box-shadow: 0 0 30px rgba(252, 211, 77, 0.7), 0 0 60px rgba(252, 211, 77, 0.5);
    }
    50% {
        box-shadow: 0 0 40px rgba(252, 211, 77, 1), 0 0 80px rgba(252, 211, 77, 0.7);
    }
}

/* Scroll offset for sticky header */
#estimator {
    scroll-margin-top: 60px;
}

/* Mobile Estimator Form Optimization - Ultra Compact for Single Viewport */
@media (max-width: 768px) {
    /* Position with equal white space top and bottom */
    #estimator {
        scroll-margin-top: 70px;
    }
    
    /* Add horizontal padding to estimator section */
    #estimator .container {
        padding-left: 0.75rem;
        padding-right: 0.75rem;
    }
    
    /* Minimize estimator section padding */
    #estimator.py-16 {
        padding-top: 0.75rem;
        padding-bottom: 0.75rem;
    }
    
    /* Minimize title margin and size */
    #estimator h2.mb-8 {
        margin-bottom: 0.375rem;
        font-size: 0.938rem;
        line-height: 1.15;
        padding-top: 0;
    }
    
    /* Minimize form container padding */
    #estimator .bg-slate-50.p-8 {
        padding: 0.5rem;
    }
    
    /* Minimize spacing between form fields */
    #estimate-form.space-y-6 {
        gap: 0.3rem;
        display: flex;
        flex-direction: column;
    }
    
    /* Minimize label font size and margin */
    #estimate-form label {
        font-size: 0.656rem;
        margin-bottom: 0.1rem;
        line-height: 1.15;
    }
    
    /* Minimize select height and padding */
    #estimate-form select {
        padding-top: 0.25rem;
        padding-bottom: 0.25rem;
        padding-left: 0.5rem;
        padding-right: 0.5rem;
        font-size: 0.719rem;
        min-height: 32px;
    }
    
    /* Minimize service type button padding and font size */
    .service-type-btn {
        padding: 0.25rem 0.4rem !important;
        font-size: 0.656rem;
        line-height: 1.1;
    }
    
    .service-type-btn .text-sm {
        font-size: 0.656rem;
        line-height: 1.1;
    }
    
    .service-type-btn .text-xs {
        font-size: 0.531rem;
        margin-top: 0.05rem;
        line-height: 1.05;
    }
    
    /* Minimize spacing in service type grid */
    #estimate-form .grid.gap-3 {
        gap: 0.2rem;
    }
    
    /* Minimize bedrooms/bathrooms grid gap */
    #estimate-form .grid.gap-6 {
        gap: 0.3rem;
    }
    
    /* Make pets section ultra compact */
    #estimate-form .grid-cols-3 {
        gap: 0.2rem;
    }
    
    #estimate-form .grid-cols-3 label {
        font-size: 0.656rem;
    }
    
    /* Minimize add-ons spacing */
    #estimate-form .space-y-3 {
        gap: 0.2rem;
        display: flex;
        flex-direction: column;
    }
    
    #estimate-form .space-y-2 {
        gap: 0.1rem;
        display: flex;
        flex-direction: column;
    }
    
    /* Minimize add-ons section heading */
    #estimate-form h3,
    #estimate-form .text-sm.font-medium {
        font-size: 0.656rem;
        margin-bottom: 0.2rem;
    }
    
    /* Minimize calculate button height */
    #calculate-estimate {
        padding-top: 0.35rem;
        padding-bottom: 0.35rem;
        font-size: 0.781rem;
        margin-top: 0.3rem !important;
    }
    
    /* Minimize window count input size */
    #window-count {
        padding: 0.125rem 0.2rem;
        font-size: 0.656rem;
        width: 2.5rem;
    }
    
    /* Minimize checkbox/radio spacing */
    input[type="checkbox"],
    input[type="radio"] {
        min-height: 30px;
        min-width: 30px;
    }
    
    /* Minimize field container spacing */
    #estimate-form > div {
        margin-bottom: 0;
    }
    
    /* Minimize checkbox label spacing */
    #estimate-form .flex.items-center {
        gap: 0.3rem;
    }
}

/* =============================================
   BEFORE/AFTER SLIDER STYLES
   ============================================= */

.before-after-slider-container {
    width: 100%;
    background: #f1f5f9;
    border-radius: 8px;
    overflow: hidden;
}

.before-after-slider {
    position: relative;
    width: 100%;
    overflow: hidden;
    cursor: ew-resize;
    user-select: none;
    -webkit-user-select: none;
    border-radius: 8px;
}

.before-after-slider img {
    width: 100%;
    height: auto;
    display: block;
    pointer-events: none;
    user-select: none;
    -webkit-user-drag: none;
}

.after-image-layer {
    position: relative;
    width: 100%;
}

.before-image-layer {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    overflow: hidden;
    clip-path: inset(0 50% 0 0);
    transition: clip-path 0.05s ease-out;
}

/* Slider Handle */
.slider-handle {
    position: absolute;
    top: 0;
    left: 50%;
    width: 4px;
    height: 100%;
    background: white;
    transform: translateX(-50%);
    cursor: ew-resize;
    z-index: 10;
    transition: opacity 0.3s;
}

.slider-handle:hover {
    opacity: 0.9;
}

.handle-line {
    position: absolute;
    top: 0;
    left: 50%;
    width: 2px;
    height: 100%;
    background: white;
    transform: translateX(-50%);
}

.handle-circle {
    position: absolute;
    top: 50%;
    left: 50%;
    width: 48px;
    height: 48px;
    background: rgba(0, 0, 0, 0.7);
    border: 3px solid white;
    border-radius: 50%;
    transform: translate(-50%, -50%);
    display: flex;
    align-items: center;
    justify-content: center;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.3);
    transition: all 0.2s ease;
}

.handle-circle:hover {
    background: rgba(0, 0, 0, 0.85);
    box-shadow: 0 6px 16px rgba(0, 0, 0, 0.4);
}

/* Before/After Labels */
.ba-label {
    position: absolute;
    top: 12px;
    padding: 6px 12px;
    background: rgba(0, 0, 0, 0.7);
    color: white;
    font-size: 12px;
    font-weight: bold;
    letter-spacing: 0.5px;
    z-index: 5;
    border-radius: 4px;
    pointer-events: none;
    transition: opacity 0.3s ease, visibility 0.3s ease;
}

.ba-label-before {
    left: 12px;
}

.ba-label-after {
    right: 12px;
}

/* Responsive adjustments */
@media (max-width: 768px) {
    .handle-circle {
        width: 40px;
        height: 40px;
    }
    
    .handle-circle svg {
        width: 20px;
        height: 20px;
    }
    
    .ba-label {
        font-size: 10px;
        padding: 4px 8px;
    }
}

/* Focus state for accessibility */
.slider-handle:focus {
    outline: 2px solid #f4b400;
    outline-offset: 2px;
}

/* =============================================
   GRADIENT TEXT STYLES
   ============================================= */

.gradient-text-yellow-orange {
    background: linear-gradient(180deg, #fde047 0%, #fb923c 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    text-fill-color: transparent;
}