/* components.css - Reusable UI Elements */

/* Buttons */
.btn {
    display: inline-block;
    padding: 12px 28px;
    border-radius: var(--radius-md);
    font-weight: 600;
    cursor: pointer;
    text-align: center;
    border: none;
    transition: var(--transition-smooth);
}

.btn-light-blue {
    background-color: var(--color-light-blue);
    color: var(--color-navy);
}

.btn-light-blue:hover {
    background-color: var(--color-white);
    transform: translateY(-3px);
    box-shadow: var(--shadow-soft);
}

.btn-outline-white {
    border: 2px solid var(--color-white);
    color: var(--color-white);
}

.btn-whatsapp {
    background-color: var(--color-whatsapp);
    color: white;
}

/* Cards */
.card {
    background: var(--color-white);
    padding: 2rem;
    border-radius: var(--radius-lg);
    box-shadow: var(--shadow-soft);
    transition: var(--transition-smooth);
}

.card:hover {
    transform: translateY(-5px);
}

/* Forms */
input, select, textarea {
    width: 100%;
    padding: 12px;
    margin-bottom: 1rem;
    border: 1px solid #ddd;
    border-radius: var(--radius-sm);
    font-family: var(--font-body);
}


/* components.css */
.nav-links a {
    color: var(--color-white);
    font-family: var(--font-body);
    font-weight: 500;
    font-size: 16px;
    transition: var(--transition-smooth);
}

.nav-links a:hover {
    color: var(--color-light-blue);
}

/* The special "Book Now" button in the menu */
.btn-light-blue {
    background-color: var(--color-light-blue);
    color: var(--color-navy) !important; /* Makes text dark on light blue */
    padding: 10px 24px;
    border-radius: var(--radius-md);
    font-weight: 600;
}

.btn-light-blue:hover {
    background-color: var(--color-white);
    transform: translateY(-2px); /* Slight lift effect */
}


/* Pricing Cards */
.pricing-card {
    background: var(--color-white);
    padding: 1.5rem;
    border-radius: var(--radius-lg);
    text-align: center;
    border: 2px solid transparent;
    box-shadow: var(--shadow-soft);
    position: relative;
}

.pricing-card.popular {
    border-color: var(--color-light-blue);
    transform: scale(1.05); /* Makes the popular item stand out */
}

.pricing-badge {
    position: absolute;
    top: -12px;
    left: 50%;
    transform: translateX(-50%);
    background: var(--color-light-blue);
    color: var(--color-navy);
    padding: 4px 12px;
    font-size: 0.75rem;
    font-weight: 700;
    border-radius: 20px;
    text-transform: uppercase;
}

.pricing-card__title {
    font-size: 1.1rem;
    color: var(--color-navy);
    margin-bottom: 0.5rem;
}

.pricing-card__price {
    font-size: 1.5rem;
    font-weight: 700;
    color: var(--color-light-blue);
}

/* SERVICES --------------- Accordion Styling */
.accordion-item {
    background: var(--color-white);
    border-radius: var(--radius-md);
    margin-bottom: 1rem;
    overflow: hidden;
    box-shadow: var(--shadow-soft);
    transition: all 0.3s ease;
}
.accordion-item[open] {
    border-color: var(--light-blue);
    box-shadow: 0 4px 12px rgba(0,0,0,0.05);
}

.accordion-header {
    padding: 1.2rem;
    cursor: pointer;
    list-style: none; /* Removes default arrow */
    display: flex;
    justify-content: space-between;
    align-items: center;
    font-weight: 600;
    color: var(--navy);
    font-size: 1.1rem;
}
.accordion-header::-webkit-details-marker {
    display: none; /* Removes default arrow for Safari */
}

.accordion-header .chevron {
    font-size: 0.8rem;
    transition: transform 0.3s ease;
    color: var(--light-blue);
}

.accordion-body {
    padding: 0 1.2rem 1.2rem 1.2rem;
    border-top: 1px solid #f0f0f0;
    background-color: #fafafa;
}

/* Row styling inside accordions */
.pricing-row {
    display: flex;
    justify-content: space-between;
    padding: 0.8rem 0;
    border-bottom: 1px dashed #ddd;
}

.pricing-row:last-child {
    border-bottom: none;
}

/* Checklist */
.check-list {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 10px;
}

/* Note text for vehicle sizes */
.pricing-card__note {
    font-size: 0.85rem;
    color: #666;
    margin-top: 5px;
}

/* Specific styling for the Maintenance Detail Card */
.bg-navy.card {
    border-left: 5px solid var(--color-light-blue);
}

.includes-box {
    background: #fff;
    padding: 2rem;
    border-radius: var(--radius-lg);
    box-shadow: var(--shadow-soft);
    border: 1px solid rgba(0,0,0,0.05);
}

.includes-box h4 {
    margin-bottom: 1.5rem;
    color: var(--color-navy);
    border-bottom: 2px solid var(--color-light-blue);
    display: inline-block;
}

.check-list li {
    margin-bottom: 10px;
    font-size: 0.95rem;
}

/* Utility to align text right on desktop */
@media (min-width: 768px) {
    .text-right {
        text-align: right;
    }
}

/* Toggle Switch Design */
.toggle-container {
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 15px;
}

.switch {
    position: relative;
    display: inline-block;
    width: 60px;
    height: 34px;
}

.switch input { 
    opacity: 0;
    width: 0;
    height: 0;
}

.slider {
    position: absolute;
    cursor: pointer;
    top: 0; left: 0; right: 0; bottom: 0;
    background-color: #ccc;
    transition: .4s;
    border-radius: 34px;
}

.slider:before {
    position: absolute;
    content: "";
    height: 26px; width: 26px;
    left: 4px; bottom: 4px;
    background-color: white;
    transition: .4s;
    border-radius: 50%;
}

input:checked + .slider {
    background-color: var(--color-light-blue);
}

input:checked + .slider:before {
    transform: translateX(26px);
}

.toggle-label {
    font-weight: 600;
    color: var(--color-navy);
}

/* Helper to hide/show lists */
.hidden {
    display: none;
}

/* components.css update */
.grid-2x2 .pricing-card {
    padding: 2.5rem 1.5rem; /* More vertical space for a balanced look */
}

/* Home Page carrousel */
/* Carousel Container */
.carousel-wrapper {
    position: relative;
    padding: 0 40px;
    margin-top: 2rem;
}

.review-carousel {
    display: flex;
    overflow-x: auto;
    scroll-snap-type: x mandatory; /* Makes it "snap" to each card */
    gap: 20px;
    padding: 20px 0;
    scrollbar-width: none; /* Hides scrollbar on Firefox */
}

.review-carousel::-webkit-scrollbar {
    display: none; /* Hides scrollbar on Chrome/Safari */
}

/* Individual Card */
.review-card {
    min-width: calc(50% - 10px); /* Shows exactly 2 per page on desktop */
    scroll-snap-align: start;
    background: white;
    padding: 30px;
    border-radius: var(--radius-lg);
    box-shadow: var(--shadow-soft);
    text-align: left; /* Aligns text to match the image/stars */
}

/* Customer Image & Header */
.review-header {
    display: flex;
    align-items: center;
    gap: 15px;
    margin-bottom: 15px;
}

.customer-img {
    width: 60px;
    height: 60px;
    border-radius: 50%; /* Makes it circular */
    object-fit: cover;
    border: 2px solid var(--color-light-blue);
}

/* Navigation Arrows */
.carousel-prev, .carousel-next {
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    background: var(--color-navy);
    color: white;
    border: none;
    width: 40px;
    height: 40px;
    border-radius: 50%;
    cursor: pointer;
    z-index: 5;
}

.carousel-prev { left: 0; }
.carousel-next { right: 0; }

/* Mobile: Show only 1 review per page */
@media (max-width: 768px) {
    .review-card {
        min-width: 100%;
    }
    .carousel-wrapper {
        padding: 0;
    }
    .carousel-prev, .carousel-next {
        display: none; /* Swiping is easier on mobile */
    }
}

/*BOOKING FORM*/

.category-label {
    font-weight: 700;
    color: var(--color-light-blue);
    margin: 15px 0 5px 0;
    font-size: 0.9rem;
    text-transform: uppercase;
}

.check-item {
    display: block;
    padding: 8px 0;
    cursor: pointer;
}

.price-display {
    background: var(--color-grey-light);
    padding: 15px;
    border-radius: var(--radius-md);
    border-left: 4px solid var(--color-light-blue);
}

.total-row { font-size: 1.2rem; font-weight: 700; display: flex; justify-content: space-between; }
.deposit-row { font-size: 1rem; color: #d9534f; font-weight: 600; display: flex; justify-content: space-between; margin-top: 5px; }

.disclaimer-box {
    background: #fff5f5;
    border: 1px solid #feb2b2;
    padding: 2rem;
    border-radius: var(--radius-lg);
}

.bank-details {
    background: white;
    padding: 15px;
    border-radius: var(--radius-md);
    border: 1px dashed #ccc;
}

/* Center the form on the page */
.form-container-centered {
    max-width: 700px;
    margin: 0 auto;
}

/* Dropdown Checkbox Style */
.category-dropdown {
    background: #f9f9f9;
    border: 1px solid #eee;
    border-radius: var(--radius-md);
    margin-bottom: 10px;
}

.category-dropdown summary {
    padding: 12px;
    font-weight: 600;
    cursor: pointer;
    color: var(--color-navy);
    list-style: none;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.category-dropdown summary::after {
    content: '▼';
    font-size: 0.8rem;
    color: var(--color-light-blue);
}

.category-dropdown[open] summary::after {
    content: '▲';
}

.checkbox-group {
    padding: 10px 15px;
    background: white;
    border-top: 1px solid #eee;
}

.check-item {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 10px 0;
    border-bottom: 1px solid #f5f5f5;
    cursor: pointer;
    font-size: 0.95rem;
}

.check-item:last-child { border-bottom: none; }

.check-item input[type="checkbox"] {
    width: 18px;
    height: 18px;
    cursor: pointer;
}

#submitBtn {
    position: relative;
    display: flex;
    justify-content: center;
    align-items: center;
    transition: all 0.3s ease;
}

/* The Spinner Ring */
.btn-spinner {
    display: none; /* Hidden by default */
    width: 20px;
    height: 20px;
    border: 3px solid rgba(255, 255, 255, 0.3);
    border-radius: 50%;
    border-top-color: #fff;
    animation: spin 0.8s ease-in-out infinite;
    position: absolute;
}

/* Animation */
@keyframes spin {
    to { transform: rotate(360deg); }
}

/* State when the form is sending */
#submitBtn.is-loading .btn-text {
    visibility: hidden; /* Keeps button size but hides text */
}

#submitBtn.is-loading .btn-spinner {
    display: block; /* Shows spinner */
}

#submitBtn:disabled {
    background-color: #a5d8ff; /* Lighter blue when disabled */
    cursor: not-allowed;
}