/* Quote page specific CSS */

/* Quote card styling */
.bg-green-100 {
    background-color: #dcfce7;
}

.text-green-600 {
    color: #16a34a;
}

/* File preview styling */
.file-preview {
    width: 120px;
    height: 120px;
    object-fit: cover;
    border-radius: 0.375rem;
    border: 1px solid #e5e7eb;
}

/* Limitations section */
#quote-limitations li {
    margin-bottom: 0.5rem;
    font-size: 0.875rem;
}

/* Additional options styling */
#additional-options-section {
    background-color: #f9fafb;
    border-radius: 0.5rem;
    padding: 1rem;
    margin-top: 1.5rem;
    margin-bottom: 1.5rem;
}

#additional-options-container > div {
    background-color: white;
    margin-bottom: 0.75rem;
    transition: all 0.2s ease;
}

#additional-options-container > div:hover {
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
}

/* Quantity control styling */
.option-quantity {
    text-align: center;
    border: 1px solid #d1d5db;
    border-left: none;
    border-right: none;
    border-radius: 0;
    height: 38px;
}

.option-decrease, .option-increase {
    cursor: pointer;
    transition: background-color 0.2s ease;
    padding: 0.5rem 0.75rem;
}

.option-decrease:hover, .option-increase:hover {
    background-color: #e5e7eb;
}

/* Highlight price changes */
@keyframes price-pulse {
    0% {
        transform: scale(1);
    }
    50% {
        transform: scale(1.05);
    }
    100% {
        transform: scale(1);
    }
}

.animate-price {
    animation: price-pulse 0.5s ease-in-out;
}

/* Button styling */
#quote-confirm {
    transition: all 0.2s ease;
}

#quote-confirm:not(:disabled):hover {
    transform: translateY(-1px);
}

#quote-back {
    transition: all 0.2s ease;
}

#quote-back:hover {
    background-color: #f9fafb;
}

/* Date and time selection styling */
input[type="date"], select {
    cursor: pointer;
}

#date1, #date2, #time1, #time2 {
    transition: border-color 0.15s ease-in-out, box-shadow 0.15s ease-in-out;
}

#date1:focus, #date2:focus, #time1:focus, #time2:focus {
    border-color: #93c5fd;
    box-shadow: 0 0 0 3px rgba(9, 105, 218, 0.2);
}

/* Payment method styling */
.payment-option {
    transition: all 0.2s ease-in-out;
}

.payment-option:hover {
    background-color: #f9fafb;
}

/* Checkbox styling */
#terms-service, .option-checkbox {
    cursor: pointer;
}

#terms-service + label, .option-checkbox + label {
    cursor: pointer;
}

/* Price changes animation */
#quote-price {
    transition: all 0.3s ease;
}

#quote-price.animate-pulse {
    color: #2563eb;
    transform: scale(1.05);
}

/* Mobile-specific styles */
@media (max-width: 640px) {
    /* More prominent call-to-action */
    #quote-confirm {
        padding: 0.75rem 1.5rem;
        font-size: 1rem;
        width: 100%;
    }
    
    /* Fix date and time selection on mobile */
    .grid.grid-cols-2.gap-4 {
        gap: 0.5rem;
    }
    
    input[type="date"], select {
        padding: 0.75rem;
        font-size: 16px; /* Prevent iOS zoom */
    }
    
    /* Ensure sufficient space between sections */
    #quote-result > div {
        margin-bottom: 2rem;
    }
    
    /* Improve checkbox visibility/accessibility */
    #terms-service, .option-checkbox {
        transform: scale(1.2);
    }
    
    /* Animation for confirmed button */
    @keyframes pulse {
        0% {
            box-shadow: 0 0 0 0 rgba(9, 105, 218, 0.4);
        }
        70% {
            box-shadow: 0 0 0 10px rgba(9, 105, 218, 0);
        }
        100% {
            box-shadow: 0 0 0 0 rgba(9, 105, 218, 0);
        }
    }
    
    #quote-confirm:not(:disabled) {
        animation: pulse 1.5s ease-out infinite;
    }
    
    /* Make quantity controls more tappable on mobile */
    .option-decrease, .option-increase {
        padding: 0.75rem 1rem;
        font-size: 1rem;
    }
    
    .option-quantity {
        font-size: 16px; /* Prevent iOS zoom */
        height: 44px;
    }
    
    /* Additional options styling for mobile */
    #additional-options-container > div {
        padding: 1rem;
        margin-bottom: 1rem;
    }
    
    /* Add more space between option sections */
    #additional-options-section {
        padding: 1rem 0.5rem;
        margin-bottom: 2rem;
    }
    
    /* Make the price more prominent */
    #quote-price {
        font-size: 1.3rem;
    }
}

/* Toggle switch */
.toggle-switch {
    position: relative;
    display: inline-block;
    width: 44px;
    height: 24px;
}

.toggle-switch input {
    opacity: 0;
    width: 0;
    height: 0;
}

.toggle-slider {
    position: absolute;
    cursor: pointer;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background-color: #e5e7eb;
    transition: .4s;
    border-radius: 34px;
}

.toggle-slider:before {
    position: absolute;
    content: "";
    height: 18px;
    width: 18px;
    left: 3px;
    bottom: 3px;
    background-color: white;
    transition: .4s;
    border-radius: 50%;
}

input:checked + .toggle-slider {
    background-color: #2563eb;
}

input:checked + .toggle-slider:before {
    transform: translateX(20px);
}

/* Quantity control */
.quantity-control {
    display: flex;
    align-items: center;
    border: 1px solid #e5e7eb;
    border-radius: 6px;
    overflow: hidden;
    width: 104px;
}

.quantity-btn {
    width: 32px;
    height: 32px;
    background-color: #f3f4f6;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    border: none;
    color: #374151;
}

.quantity-btn:hover {
    background-color: #e5e7eb;
}

.quantity-input {
    width: 40px;
    height: 32px;
    border: none;
    text-align: center;
    font-size: 14px;
    color: #1f2937;
    -moz-appearance: textfield;
}

.quantity-input::-webkit-outer-spin-button,
.quantity-input::-webkit-inner-spin-button {
    -webkit-appearance: none;
    margin: 0;
}

/* Option card */
.option-card {
    background-color: white;
    border-radius: 8px;
    border: 1px solid #e5e7eb;
    margin-bottom: 12px;
    width: 100%;
}

#additional-options-section {
    width: 100%;
}

#additional-options-container {
    width: 100%;
}

/* Persistent price footer */
#price-footer {
    transition: transform 0.3s ease;
    box-shadow: 0 -2px 8px rgba(0, 0, 0, 0.1);
    margin-bottom: 0 !important;
}

#footer-price {
    transition: all 0.3s ease;
}

#footer-price.animate-pulse {
    color: #2563eb;
    transform: scale(1.05);
}

/* Hide the original mobile navigation when on quote page */
.step-content:has(#quote-result) ~ #mobile-bottom-nav {
    display: none !important;
}

/* Increase bottom padding to account for the footer */
#quote-result {
    padding-bottom: 80px;
}

/* Make the footer button more prominent on mobile */
@media (max-width: 640px) {
    #footer-confirm {
        padding: 0.75rem 1.5rem;
        font-size: 1rem;
    }
    
    /* Hide the original quote-confirm button on mobile */
    #quote-confirm {
        display: none;
    }
}

/* Error highlight animation */
@keyframes error-highlight-pulse {
    0% {
        background-color: transparent;
    }
    30% {
        background-color: rgba(254, 226, 226, 0.5);  /* light red background */
    }
    100% {
        background-color: transparent;
    }
}

.error-highlight {
    animation: error-highlight-pulse 1.5s ease;
    border-radius: 0.375rem;
}

/* Error message styling */
.error-message {
    color: #dc2626;
    font-size: 0.875rem;
    margin-top: 0.25rem;
}

/* Red border for form validation errors */
.border-red-500 {
    border-color: #ef4444 !important;
}

/* Date-time group spacing */
.date-time-group {
    margin-bottom: 1.5rem;
}

/* Make validation errors more prominent on mobile */
@media (max-width: 640px) {
    .error-message {
        font-weight: 500;
    }
    
    .error-highlight {
        padding: 0.75rem;
        margin: -0.75rem;
    }
}

/* Payment method styling enhancements */
.payment-option {
    transition: all 0.2s ease-in-out;
    cursor: pointer;
}

.payment-option:hover {
    background-color: #f9fafb;
}

.payment-option input[type="radio"] {
    cursor: pointer;
}

.payment-option.selected {
    background-color: #f0f7ff;
    border-color: #60a5fa;
}

/* Single payment option with discount styling */
.payment-option[data-payment-type="single"] {
    position: relative;
}

.payment-option[data-payment-type="single"].selected {
    background-color: #ecfdf5 !important; /* Light green background */
    border-color: #34d399 !important; /* Green border */
}

/* Animation for discount hints */
@keyframes pulse-hint {
    0% {
        opacity: 0.7;
    }
    50% {
        opacity: 1;
    }
    100% {
        opacity: 0.7;
    }
}

.animate-pulse-hint {
    animation: pulse-hint 1.5s infinite;
}

/* Make the payment options more visually prominent */
.payment-options-container {
    border-width: 1px;
    transition: all 0.3s ease;
}

.payment-options-container:hover {
    box-shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.1), 0 2px 4px -1px rgba(0, 0, 0, 0.06);
}

/* Ring effect for highlighting the payment section */
.ring-highlight {
    box-shadow: 0 0 0 3px rgba(59, 130, 246, 0.5);
}

/* Footer discount hint */
#footer-discount-hint {
    padding: 2px 4px;
    border-radius: 4px;
    background-color: rgba(59, 130, 246, 0.1);
    transition: all 0.2s ease;
}

#footer-discount-hint:hover {
    background-color: rgba(59, 130, 246, 0.2);
}

/* Main price discount hint */
#discount-hint {
    padding: 2px 4px;
    border-radius: 4px;
    transition: all 0.2s ease;
}

#discount-hint:hover {
    background-color: rgba(59, 130, 246, 0.1);
}

 /* Price footer mobile optimizations */
 @media (max-width: 640px) {
     #price-footer {
         padding-bottom: calc(env(safe-area-inset-bottom) + 1rem);
     }
     
     /* Add more space for the footer on mobile */
     #quote-result {
         padding-bottom: 120px !important;
     }
     
     /* Make footer price more prominent */
     #footer-price {
         font-size: 1.5rem; /* 24px */
     }
     
     /* Add discount indication next to price */
     #footer-price .discount-label {
         display: inline-block;
         margin-left: 0.5rem;
         padding: 0.25rem 0.5rem;
         background-color: #ecfdf5;
         color: #047857;
         border-radius: 0.25rem;
         font-size: 0.875rem;
         font-weight: 500;
     }
     
     /* Make sure the button is big enough to tap */
     #footer-confirm {
         height: 3rem;
         font-size: 1rem;
     }
     
     /* Make payment options more prominent on mobile */
     .payment-options-container {
         border-width: 2px;
     }
     
     /* Add more spacing between payment options on mobile */
     .payment-option {
         padding: 1rem;
     }
     
     /* Make the discount amount more visible */
     #single-payment-discount {
         font-size: 1.1rem;
     }
 }
 
 /* General footer improvements */
 #price-footer {
     transition: all 0.3s ease-in-out;
 }
 
 /* Add animation when price changes */
 @keyframes price-update {
     0% {
         transform: scale(1);
     }
     50% {
         transform: scale(1.1);
     }
     100% {
         transform: scale(1);
     }
 }
 
 .price-updated {
     animation: price-update 0.5s ease-in-out;
 }

/* Product availability section */
.product-availability-option {
    transition: all 0.2s ease;
}

.product-availability-option:hover {
    transform: translateY(-1px);
    box-shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.1);
}

.product-availability-option input[type="radio"]:checked + .ml-3 {
    color: #1e40af;
}

.product-availability-option:has(input[type="radio"]:checked) {
    border-color: #3b82f6 !important;
    background-color: #eff6ff !important;
}

#expected-delivery-section {
    transition: all 0.3s ease;
}

#expected-delivery-date {
    transition: all 0.2s ease;
}

#expected-delivery-date:focus {
    box-shadow: 0 0 0 3px rgba(59, 130, 246, 0.1);
}
 