/* Variables */
:root {
    --primary-color: #2c3e50;
    --secondary-color: #3498db;
    --accent-color: #666666;
    --text-color: #495057;
    --light-bg: #f8f8f8;
    --white: #ffffff;
    --light-gray: #f8f9fa;
    --soft-grey: #888888;
    --gray-100: #f8f9fa;
    --gray-200: #e9ecef;
    --gray-300: #dee2e6;
    --gray-600: #6c757d;
    --error-color: #dc3545;
    --shadow-sm: 0 4px 12px rgba(0,0,0,0.06);
    --shadow-md: 0 4px 12px rgba(0,0,0,0.1);
    --shadow-lg: 0 8px 25px rgba(0,0,0,0.15);
    --radius-sm: 4px;
    --radius-md: 8px;
    --radius-lg: 16px;
    --border-color: #e9ecef;
}

/* Main Container */
.booking-container {
    max-width: 1100px;
    margin: 0 auto;
    padding: 6rem 1.25rem 3rem;
}

.page-header {
    text-align: center;
    margin-bottom: 2.5rem;
}

.page-header h1 {
    font-family: var(--font-heading, 'Playfair Display', serif);
    color: #222;
    font-size: 2rem;
    font-weight: 700;
    margin-bottom: 0.4rem;
}

.page-header p {
    color: #666;
    font-size: 0.95rem;
}

/* Two-column layout */
.booking-layout {
    display: grid;
    grid-template-columns: 1fr 300px;
    gap: 2rem;
    align-items: start;
}

@media (max-width: 900px) {
    .booking-layout {
        grid-template-columns: 1fr;
    }
}

/* Sidebar */
.booking-sidebar {
    display: flex;
    flex-direction: column;
    gap: 1.25rem;
    position: sticky;
    top: 80px;
}

.sidebar-card {
    background: #fff;
    border-radius: 10px;
    padding: 1.25rem;
    box-shadow: 0 2px 8px rgba(0,0,0,0.06);
    border: 1px solid #eee;
}

.sidebar-card-icon {
    width: 36px;
    height: 36px;
    border-radius: 50%;
    background: var(--color-accent, #c8914e);
    color: #fff;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 0.9rem;
    margin-bottom: 0.75rem;
}

.sidebar-card h3 {
    font-size: 1rem;
    font-weight: 600;
    color: #222;
    margin-bottom: 0.5rem;
}

.sidebar-card p {
    font-size: 0.88rem;
    color: #555;
    line-height: 1.5;
    margin: 0.15rem 0;
}

.sidebar-card ul {
    list-style: none;
    padding: 0;
    margin: 0;
}

.sidebar-card ul li {
    font-size: 0.88rem;
    color: #555;
    padding: 0.3rem 0;
    padding-left: 1.2rem;
    position: relative;
    line-height: 1.5;
}

.sidebar-card ul li::before {
    content: "•";
    position: absolute;
    left: 0;
    color: var(--color-accent, #c8914e);
    font-weight: bold;
}

/* Form row (side-by-side fields) */
.form-row {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 1rem;
}

@media (max-width: 560px) {
    .form-row {
        grid-template-columns: 1fr;
    }
}

/* Form actions */
.form-actions {
    display: flex;
    align-items: center;
    gap: 1rem;
    margin-top: 0.5rem;
}

.cancel-button {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 0.85rem 2rem;
    background: #fff;
    color: #555;
    border: 1px solid #ddd;
    border-radius: 6px;
    font-size: 1rem;
    font-weight: 500;
    text-decoration: none;
    cursor: pointer;
    transition: all 0.2s ease;
}

.cancel-button:hover {
    background: #f5f5f5;
    border-color: #bbb;
}

/* Form section styles */
.form-section {
    background: white;
    border-radius: 10px;
    padding: 1.5rem;
    margin-bottom: 1.5rem;
    box-shadow: 0 2px 8px rgba(0,0,0,0.06);
    border: 1px solid #eee;
}

.form-section h2 {
    margin-bottom: 1.25rem;
    color: #222;
    font-size: 1.15rem;
    font-weight: 600;
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.form-section h2 i {
    color: var(--color-accent, #c8914e);
    font-size: 1rem;
}

/* Form group styles */
.form-group {
    margin-bottom: 20px;
}

.form-group label {
    display: block;
    margin-bottom: 8px;
    font-weight: 500;
    color: #333;
}

.form-group input[type="text"],
.form-group input[type="tel"],
.form-group input[type="email"],
.form-group select,
.form-group textarea {
    width: 100%;
    padding: 10px;
    border: 1px solid #ddd;
    border-radius: 4px;
    font-size: 16px;
}

.form-group input[type="text"]:focus,
.form-group input[type="tel"]:focus,
.form-group input[type="email"]:focus,
.form-group select:focus,
.form-group textarea:focus {
    border-color: #4a90e2;
    outline: none;
    box-shadow: 0 0 0 2px rgba(74, 144, 226, 0.2);
}

.form-group input[required],
.form-group select[required] {
    background-color: #fff;
    border-left: 3px solid #c8914e;
}

.form-group input[type="file"] {
    padding: 0.5rem 0;
}

/* Image preview styles */
.image-preview {
    margin-top: 1rem;
    padding: 1rem;
    border: 1px solid #ddd;
    border-radius: 4px;
    text-align: center;
}

.image-preview img {
    max-width: 200px;
    max-height: 200px;
    border-radius: 4px;
}

.remove-image {
    margin-top: 0.5rem;
    padding: 0.5rem 1rem;
    background: #dc3545;
    color: white;
    border: none;
    border-radius: 4px;
    cursor: pointer;
}

.remove-image:hover {
    background: #c82333;
}

/* Price info styles */
.price-info {
    background: #f8f9fa;
    padding: 1.5rem;
    border-radius: 4px;
    margin-bottom: 1.5rem;
}

.price-info p {
    margin: 0.5rem 0;
    font-size: 1.1rem;
}

.deposit-note {
    font-size: 0.9rem;
    color: #666;
    margin-top: 1rem;
}

/* Service note styles */
.service-note {
    color: #666;
    font-style: italic;
    font-size: 0.9em;
    margin: 5px 0;
}

/* Submit button styles */
.submit-button {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 0.85rem 2.5rem;
    background: #222;
    color: white;
    border: none;
    border-radius: 6px;
    font-size: 1rem;
    font-weight: 500;
    cursor: pointer;
    transition: background 0.2s ease;
}

.submit-button:hover {
    background: #444;
}

.submit-button:disabled {
    background: #888;
    cursor: not-allowed;
}

.payment-section-note {
    margin-bottom: 1rem;
}

.payment-customer-summary {
    margin-bottom: 1rem;
}

.payment-summary-field {
    margin-bottom: 0;
}

.payment-summary-field input[readonly] {
    background: #f7f7f7;
    color: #555;
    cursor: default;
}

.payment-element-container {
    min-height: 120px;
    padding: 1rem 1.25rem;
    border: 1px solid #e6dccf;
    border-radius: 8px;
    background: #faf7f2;
}

.payment-section .payment-customer-summary {
    margin-bottom: 1rem;
}

.payment-section .form-row {
    display: flex;
    gap: 1rem;
    flex-wrap: wrap;
}

.payment-section .payment-summary-field {
    flex: 1;
    min-width: 140px;
}

/* Custom card form (our layout + Stripe Card Element) */
.custom-card-form {
    margin-top: 0.5rem;
}
.custom-card-label {
    display: block;
    font-weight: 500;
    color: #333;
    margin-bottom: 0.5rem;
    font-size: 0.95rem;
}
#card-element {
    padding: 0.75rem;
    border: 1px solid #e6dccf;
    border-radius: 8px;
    background: #fff;
}
#card-element.StripeElement--focus {
    border-color: #c8914e;
    box-shadow: 0 0 0 2px rgba(200, 145, 78, 0.2);
}
#card-errors {
    color: #c0392b;
    font-size: 0.9rem;
    margin-top: 0.5rem;
    min-height: 1.25rem;
}

.payment-placeholder,
.payment-loading {
    margin: 0;
    color: #666;
    font-size: 0.95rem;
}

.payment-loading i {
    margin-right: 0.5rem;
    color: #c8914e;
}

.payment-message {
    min-height: 1.25rem;
    margin-top: 0.75rem;
    font-size: 0.95rem;
    color: #555;
}

.payment-message-error {
    color: #c0392b;
}

.payment-message-success {
    color: #2e7d32;
}

/* Old nav/footer overrides removed — using site-wide styles from styles.css */

/* Responsive styles */
@media (max-width: 1200px) {
    .booking-container {
        padding: 6rem 1rem 2rem;
    }
}

@media (max-width: 768px) {
    .booking-datetime-container {
        flex-direction: column;
        min-height: auto;
    }

    .calendar-container,
    .time-slots-container {
        width: 100%;
    }

    .time-slots-container {
        min-height: 400px;
    }

    .flatpickr-day {
        width: 40px;
        height: 40px;
        line-height: 40px;
    }
}

/* Error message styles */
.error-message {
    background-color: #fff3f3;
    border: 1px solid #ffcdd2;
    border-radius: 4px;
    padding: 1rem;
    margin: 1rem 0;
    text-align: center;
    color: #d32f2f;
}

.error-details {
    font-size: 0.9rem;
    color: #666;
    margin-top: 0.5rem;
}

/* Required field indicator */
.required {
    color: #dc3545;
    margin-left: 2px;
}

/* Page Title */
.page-title {
    text-align: center;
    color: var(--primary-color);
    font-size: 2.5rem;
    margin-bottom: 3rem;
    font-weight: 700;
    position: relative;
}

.page-title::after {
    content: '';
    display: block;
    width: 80px;
    height: 4px;
    background: var(--accent-color);
    margin: 1rem auto 0;
    border-radius: 2px;
}

/* Booking Grid */
.booking-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 4rem;
    margin-top: 2rem;
}

/* Calendar Section */
.calendar-section {
    background: #fff;
    padding: 2rem;
    border-radius: 16px;
    box-shadow: 0 4px 6px rgba(0, 0, 0, 0.1);
}

.section-title {
    color: #333;
    font-size: 1.75rem;
    margin-bottom: 1.5rem;
    font-weight: 600;
}

/* --- CLASSIC CALENDAR STYLES --- */
.calendar-wrapper {
    width: 100%;
    background: white;
    border-radius: 6px;
    box-shadow: var(--shadow-sm);
    overflow: hidden;
    border: 1px solid var(--gray-200);
    margin-bottom: 0;
}

.calendar-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 8px 12px;
    background: var(--gray-100);
    color: var(--primary-color);
    font-size: 1rem;
    border-bottom: 1px solid var(--gray-200);
}

.calendar-nav-btn {
    background: transparent;
    border: none;
    color: var(--primary-color);
    padding: 2px 8px;
    cursor: pointer;
    font-size: 1.1rem;
    border-radius: 4px;
    transition: background 0.2s;
}
.calendar-nav-btn:hover {
    background: var(--gray-200);
}

#calendar-month-year {
    font-size: 1rem;
    font-weight: 600;
    letter-spacing: 0.5px;
}

.calendar-weekdays {
    display: grid;
    grid-template-columns: repeat(7, 1fr);
    text-align: center;
    background: var(--gray-100);
    border-bottom: 1px solid var(--gray-200);
    font-size: 0.95rem;
    color: var(--gray-600);
    padding: 0;
}
.calendar-weekdays div {
    padding: 4px 0;
    font-weight: 500;
}

.calendar-days {
    display: grid;
    grid-template-columns: repeat(7, 1fr);
    background: white;
    gap: 0;
    padding: 0;
}
.calendar-day {
    height: 32px;
    min-width: 32px;
    max-width: 40px;
    margin: 0 auto;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1rem;
    color: var(--primary-color);
    background: white;
    border: none;
    border-radius: 0;
    cursor: pointer;
    transition: background 0.15s, color 0.15s;
    position: relative;
    outline: none;
}
.calendar-day:not(.empty):not(.past):hover {
    background: var(--gray-100);
    color: var(--secondary-color);
}
.calendar-day.selected {
    background: var(--secondary-color);
    color: white;
    font-weight: 600;
    border-radius: 4px;
}
.calendar-day.today {
    border: 1.5px solid var(--secondary-color);
    color: var(--secondary-color);
    font-weight: 600;
    background: white;
    border-radius: 4px;
}
.calendar-day.past {
    color: var(--gray-300);
    background: var(--gray-100);
    cursor: not-allowed;
}
.calendar-day.empty {
    background: white;
    cursor: default;
}

@media (max-width: 768px) {
    .calendar-wrapper {
        min-width: 0;
        border-radius: 4px;
    }
    .calendar-day {
        height: 28px;
        min-width: 28px;
        font-size: 0.95rem;
    }
    .calendar-header {
        font-size: 0.95rem;
        padding: 6px 6px;
    }
}

/* Remove large circle and red background for Sundays */
.calendar-day.past[title="Closed on Sundays"] {
    background: var(--gray-100);
    color: var(--gray-300);
    border-radius: 0;
}

/* Time Slots */
.time-slots-container {
    background: white;
    border-radius: 12px;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.1);
    padding: 40px;
    width: 100%;
    margin: 0;
}

.time-slots-container.hidden {
    display: none;
}

.time-slots-container h3 {
    text-align: center;
    margin-bottom: 32px;
    color: #333;
    font-size: 1.6rem;
}

.time-slots-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(140px, 1fr));
    gap: 12px;
    padding: 1rem;
}

.time-slot {
    padding: 12px 8px;
    text-align: center;
    background: white;
    border: 1px solid #ddd;
    border-radius: 8px;
    cursor: pointer;
    transition: all 0.2s ease;
    font-size: 0.95rem;
}

.time-slot:not(.unavailable):hover {
    border-color: #333;
    background-color: #f5f5f5;
    transform: translateY(-2px);
    box-shadow: 0 2px 4px rgba(0,0,0,0.1);
}

.time-slot.selected {
    background-color: #333;
    color: white;
    border-color: #333;
    transform: translateY(-2px);
    box-shadow: 0 2px 4px rgba(0,0,0,0.1);
}

.time-slot.unavailable {
    opacity: 0.5;
    cursor: not-allowed;
    background-color: #f5f5f5;
    text-decoration: line-through;
}

/* Booking Form Section */
.booking-form-section {
    padding: 1rem;
}

.booking-form-section h2 {
    color: var(--primary-color);
    margin-bottom: 1.5rem;
}

.booking-form {
    display: flex;
    flex-direction: column;
    gap: 1.5rem;
}

.form-group {
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
}

.form-group label {
    font-weight: 500;
    color: #444;
}

.form-group input,
.form-group select,
.form-group textarea {
    padding: 0.8rem;
    border: 1px solid #ddd;
    border-radius: 5px;
    font-size: 1rem;
}

.form-group input:focus,
.form-group select:focus,
.form-group textarea:focus {
    outline: none;
    border-color: var(--primary-color);
    box-shadow: 0 0 5px rgba(139, 69, 19, 0.2);
}

/* Form Fields */
.form-group .required {
    color: #ff4444;
    margin-left: 4px;
}

.field-description {
    font-size: 0.9rem;
    color: #666;
    margin: 0.25rem 0 0.5rem;
    line-height: 1.4;
}

/* File Upload */
.form-group input[type="file"] {
    padding: 0.8rem;
    border: 2px dashed var(--primary-color);
    border-radius: 5px;
    background: #f9f9f9;
    cursor: pointer;
    width: 100%;
}

.form-group input[type="file"]:hover {
    background: #f0f0f0;
    border-color: var(--accent-color);
}

.file-preview {
    margin-top: 1rem;
    max-width: 300px;
    border-radius: 8px;
    overflow: hidden;
    box-shadow: 0 3px 10px rgba(0,0,0,0.1);
}

.file-preview img {
    width: 100%;
    height: auto;
    display: block;
}

/* Price Summary */
.price-summary {
    background: var(--gray-100);
    padding: 1.5rem;
    border-radius: var(--radius-md);
    margin: 1.5rem 0;
    border-left: 4px solid var(--accent-color);
}

.price-details {
    display: flex;
    flex-direction: column;
    gap: 0.75rem;
}

.total-price,
.deposit-price {
    display: flex;
    justify-content: space-between;
    align-items: center;
    font-weight: 500;
    padding: 0.5rem;
    background: var(--white);
    border-radius: var(--radius-sm);
}

.total-price {
    color: var(--text-color);
    font-size: 1.1rem;
}

.deposit-price {
    color: var(--primary-color);
    background: rgba(139, 69, 19, 0.05);
}

.deposit-price span:last-child {
    font-weight: 600;
}

.deposit-note {
    margin-top: 0.75rem;
    font-size: 0.875rem;
    color: var(--gray-600);
    text-align: center;
    font-style: italic;
}

/* Confirm Button */
.confirm-button {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
    width: 100%;
    padding: 1rem;
    background: var(--primary-color);
    color: var(--white);
    border: none;
    border-radius: 5px;
    font-size: 1.1rem;
    font-weight: 500;
    cursor: pointer;
    transition: background-color 0.3s ease;
}

.confirm-button:hover {
    background: var(--accent-color);
}

/* Back Button */
.back-button {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    color: var(--white);
    text-decoration: none;
    font-weight: 500;
}

.back-button:hover {
    color: var(--accent-color);
}

/* Form Validation */
.form-group input.error,
.form-group select.error {
    border-color: #ff4444;
}

.form-group input.error:focus,
.form-group select.error:focus {
    box-shadow: 0 0 5px rgba(255, 68, 68, 0.2);
}

/* Price animations */
@keyframes priceUpdate {
    0% {
        transform: scale(1);
        opacity: 0.7;
    }
    50% {
        transform: scale(1.05);
    }
    100% {
        transform: scale(1);
        opacity: 1;
    }
}

.total-price span,
.deposit-price span {
    display: inline-block;
}

#total-price,
#deposit-price {
    font-weight: 600;
    color: var(--primary-color);
}

/* Price Information */
.price-info {
    background: var(--white);
    padding: 1.5rem;
    border-radius: var(--radius-lg);
    box-shadow: var(--shadow-sm);
    margin-top: 2rem;
}

.price-info h2 {
    color: var(--primary-color);
    font-size: 1.2rem;
    margin-bottom: 0.5rem;
}

.price-range,
.deposit-range {
    font-size: 1.5rem;
    font-weight: bold;
    color: var(--primary-color);
    margin: 0.5rem 0;
}

.deposit-info {
    margin-top: 1rem;
    padding: 1rem;
    background-color: var(--gray-100);
    border-radius: 8px;
}

.deposit-info h3 {
    color: var(--primary-color);
    font-size: 1rem;
    margin-bottom: 0.5rem;
}

.deposit-note {
    font-size: 0.9rem;
    color: #666;
    margin: 0.3rem 0;
}

.deposit-warning {
    color: var(--primary-color);
    font-weight: bold;
    margin-top: 0.5rem;
}

@media (max-width: 768px) {
    .price-info {
        padding: 1.25rem;
    }

    .price-range {
        font-size: 1.3rem;
    }

    .deposit-range {
        font-size: 1.1rem;
    }
}

.time-slot-btn {
    background: #fff;
    border: 1px solid var(--accent-color);
    color: var(--primary-color);
    border-radius: 6px;
    padding: 0.5rem 1.2rem;
    margin: 0.25rem 0.5rem 0.25rem 0;
    font-size: 1rem;
    cursor: pointer;
    transition: background 0.2s, color 0.2s, box-shadow 0.2s, transform 0.18s;
}
.time-slot-btn.selected, .time-slot-btn:hover {
    background: var(--accent-color);
    color: #fff;
    border-color: var(--primary-color);
    transform: scale(1.08);
    box-shadow: var(--shadow-md);
}
#time-slots-grid {
    display: flex;
    flex-wrap: wrap;
    margin-top: 0.5rem;
}

@keyframes fadeInUp {
    0% {
        opacity: 0;
        transform: translateY(40px);
    }
    100% {
        opacity: 1;
        transform: translateY(0);
    }
}

@keyframes fadeIn {
    0% { opacity: 0; }
    100% { opacity: 1; }
}

@keyframes popSelected {
    0% { transform: scale(1); }
    60% { transform: scale(1.18); }
    100% { transform: scale(1); }
}

/* Style for disabled/booked time slots */
.time-slot-btn.disabled {
    opacity: 0.4; /* Make it visibly faded */
    cursor: not-allowed;
    background-color: #f0f0f0; /* Lighter background */
    border-color: #ddd; /* Lighter border */
    color: #999; /* Lighter text color */
    text-decoration: line-through; /* Optional: indicate it's unavailable */
}

/* Image Upload Styles */
#current-hair-image,
#reference-image {
    padding: 0.75rem;
    border: 2px dashed var(--gray-300);
    border-radius: var(--radius-md);
    background: var(--white);
    transition: all 0.3s ease;
}

#current-hair-image:hover,
#reference-image:hover {
    border-color: var(--accent-color);
    background: var(--light-gray);
}

#current-hair-preview,
#image-preview {
    background: var(--white);
    padding: 1rem;
    border-radius: var(--radius-md);
    border: 1px solid var(--gray-200);
    display: flex;
    align-items: center;
    gap: 1rem;
}

#current-hair-preview-img,
#preview-img {
    border: 1px solid var(--gray-200);
    box-shadow: var(--shadow-sm);
}

#remove-current-hair-image,
#remove-image {
    background: var(--error-color) !important;
    color: white !important;
    border: none !important;
    border-radius: var(--radius-sm) !important;
    padding: 0.5rem 1rem !important;
    cursor: pointer !important;
    font-size: 0.9rem !important;
    transition: background 0.3s ease !important;
}

#remove-current-hair-image:hover,
#remove-image:hover {
    background: #c82333 !important;
}

.form-text {
    color: var(--gray-600);
    font-size: 0.875rem;
    margin-top: 0.5rem;
}

@keyframes fadeInUp {
    from {
        opacity: 0;
        transform: translateY(40px);
    }
    100% {
        opacity: 1;
        transform: translateY(0);
    }
}

/* Promo Code Styling */
#promo-feedback {
    padding: 0.5rem 0.75rem;
    border-radius: var(--radius-sm);
    font-weight: 500;
    animation: fadeIn 0.3s ease-in-out;
}

#promo-feedback.success {
    background-color: #d4edda;
    border: 1px solid #c3e6cb;
    color: #155724;
}

#promo-feedback.error {
    background-color: #f8d7da;
    border: 1px solid #f5c6cb;
    color: #721c24;
}

#discount-info {
    background: linear-gradient(135deg, #d4edda 0%, #c3e6cb 100%);
    border: 1px solid #28a745;
    box-shadow: var(--shadow-sm);
    animation: fadeIn 0.5s ease-in-out;
}

#promo-code {
    transition: border-color 0.3s ease, box-shadow 0.3s ease;
}

#promo-code:focus {
    border-color: var(--accent-color);
    box-shadow: 0 0 0 3px rgba(102, 102, 102, 0.1);
}

/* Discount amount animation */
#discount-amount {
    animation: priceUpdate 0.3s ease-in-out;
}

@keyframes priceUpdate {
    0% {
        transform: scale(1);
        opacity: 0.7;
    }
    50% {
        transform: scale(1.05);
    }
    100% {
        transform: scale(1);
        opacity: 1;
    }
}

/* Time Estimate Styling */
.time-estimate-info {
    margin-top: 1.5rem;
    padding: 1rem;
    background-color: var(--gray-100);
    border-radius: 8px;
    border-left: 4px solid var(--accent-color);
}

.time-estimate-info h3 {
    color: var(--primary-color);
    font-size: 1rem;
    margin-bottom: 0.5rem;
}

.time-estimate-range {
    font-size: 1.3rem;
    color: var(--primary-color);
    font-weight: bold;
    margin: 0.5rem 0;
}

.time-estimate-note {
    font-size: 0.95rem;
    color: #666;
    margin: 0.3rem 0;
}

#time-slots-grid {
    display: flex;
    flex-wrap: wrap;
    margin-top: 0.5rem;
}

.error-message {
    background-color: #fff3f3;
    border: 1px solid #ffcdd2;
    border-radius: 4px;
    padding: 20px;
    margin: 20px 0;
    text-align: center;
}

.error-message p {
    margin: 0 0 10px;
    color: #d32f2f;
}

.error-message .error-details {
    font-size: 0.9em;
    color: #666;
    margin-bottom: 15px;
}

.retry-button {
    background-color: #d32f2f;
    color: white;
    border: none;
    padding: 8px 16px;
    border-radius: 4px;
    cursor: pointer;
    font-size: 14px;
    transition: background-color 0.3s;
}

.retry-button:hover {
    background-color: #b71c1c;
}

/* Date and Time Selection Styles */
input[type="date"] {
    width: 100%;
    padding: 0.75rem;
    border: 1px solid #ddd;
    border-radius: 4px;
    font-size: 1rem;
    font-family: inherit;
}

input[type="date"]::-webkit-calendar-picker-indicator {
    cursor: pointer;
    padding: 5px;
    filter: invert(0.4);
}

input[type="date"]::-webkit-calendar-picker-indicator:hover {
    filter: invert(0.6);
}

.time-note {
    font-size: 0.9rem;
    color: #666;
    margin-top: 1rem;
    padding: 1rem;
    background-color: #f8f9fa;
    border-radius: 4px;
    border-left: 4px solid #28a745;
}

/* Enhance select styling */
select {
    appearance: none;
    -webkit-appearance: none;
    -moz-appearance: none;
    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='currentColor' 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");
    background-repeat: no-repeat;
    background-position: right 1rem center;
    background-size: 1em;
    padding-right: 2.5rem !important;
}

select:hover {
    border-color: #28a745;
}

select:focus {
    border-color: #28a745;
    box-shadow: 0 0 0 2px rgba(40, 167, 69, 0.2);
}

/* Disabled dates and times */
input[type="date"]:disabled,
select:disabled {
    background-color: #f8f9fa;
    cursor: not-allowed;
}

/* Calendar Styles */
.flatpickr-calendar {
    background: #fff;
    box-shadow: 0 4px 6px rgba(0, 0, 0, 0.1);
    border-radius: 8px;
    margin-top: 4px;
    width: 100%;
    max-width: 307.875px;
}

.flatpickr-day.selected {
    background: #28a745 !important;
    border-color: #28a745 !important;
}

.flatpickr-day:hover {
    background: #e9ecef;
}

.flatpickr-time input:hover,
.flatpickr-time .flatpickr-am-pm:hover,
.flatpickr-time input:focus,
.flatpickr-time .flatpickr-am-pm:focus {
    background: #e9ecef;
}

.help-text-container {
    margin-top: 24px;
    padding: 16px;
    background: #f8f9fa;
    border-radius: 8px;
    border: 1px solid #e9ecef;
}

.help-text {
    color: #666;
    font-size: 0.9em;
    margin-bottom: 8px;
}

.help-text:last-child {
    margin-bottom: 0;
}

.availability-note {
    color: #333;
    display: flex;
    align-items: center;
    gap: 8px;
    margin-top: 12px;
    padding-top: 12px;
    border-top: 1px solid #e9ecef;
}

.availability-note i {
    color: #28a745;
}

.availability-note a {
    color: #28a745;
    text-decoration: none;
    font-weight: 500;
}

.availability-note a:hover {
    text-decoration: underline;
}

/* Make the calendar input match other form inputs */
.booking-form #appointment-datetime {
    width: 100%;
    padding: 12px;
    border: 1px solid #ddd;
    border-radius: 4px;
    font-size: 16px;
    cursor: pointer;
    background: #fff;
}

.booking-form #appointment-datetime:focus {
    outline: none;
    border-color: #28a745;
    box-shadow: 0 0 0 2px rgba(40, 167, 69, 0.25);
}

/* Calendar icon */
.flatpickr-input[readonly] {
    cursor: pointer;
    background: #fff;
}

/* Time picker styling */
.flatpickr-time {
    border-radius: 0 0 8px 8px;
    background: #fff;
}

.flatpickr-time input {
    color: #333;
    font-size: 14px;
}

/* Current day highlight */
.flatpickr-day.today {
    border-color: #28a745;
}

/* Selected time */
.flatpickr-time input.flatpickr-hour.selected,
.flatpickr-time input.flatpickr-minute.selected {
    background: #28a745;
    color: white;
}

/* Disabled days */
.flatpickr-day.disabled {
    color: #ccc;
}

/* Calendar Container */
.calendar-container {
    position: relative;
    margin-bottom: 2rem;
    padding-bottom: 80px; /* Add space for the time picker */
}

.flatpickr-calendar.inline {
    margin: 0 auto;
    box-shadow: var(--shadow-md);
    border-radius: var(--radius-md);
    width: 100% !important;
    max-width: 400px;
}

.flatpickr-calendar.inline .flatpickr-time {
    position: relative;
    border-top: 1px solid var(--gray-300);
    margin: 0;
    padding: 10px;
    height: auto;
    background: white;
    border-radius: 0 0 var(--radius-md) var(--radius-md);
}

.flatpickr-time input {
    font-size: 16px;
    padding: 5px;
    height: auto;
    border: 1px solid var(--gray-300);
    border-radius: var(--radius-sm);
    width: 70px;
}

.flatpickr-time .flatpickr-am-pm {
    font-size: 16px;
    padding: 5px;
    height: auto;
    border: 1px solid var(--gray-300);
    border-radius: var(--radius-sm);
    width: 60px;
}

.flatpickr-calendar.inline .flatpickr-time .numInputWrapper {
    width: auto;
    height: auto;
    float: none;
    display: inline-block;
}

.flatpickr-calendar.inline .flatpickr-time .flatpickr-time-separator {
    display: inline-block;
    padding: 0 5px;
    color: var(--gray-600);
    font-weight: bold;
}

@media (max-width: 768px) {
    .calendar-container {
        padding-bottom: 100px; /* More space on mobile */
    }
    
    .flatpickr-calendar.inline {
        max-width: 100%;
    }
    
    .flatpickr-time input,
    .flatpickr-time .flatpickr-am-pm {
        font-size: 14px;
        padding: 8px;
    }
}

/* Booking info banner (live-site style) */
.booking-info-banner {
    display: flex;
    align-items: flex-start;
    gap: 12px;
    background: #e3f2fd;
    color: #0d47a1;
    padding: 14px 18px;
    border-radius: 8px;
    margin-bottom: 20px;
    border: 1px solid #bbdefb;
}
.booking-info-banner i {
    font-size: 1.25rem;
    flex-shrink: 0;
    margin-top: 2px;
}
.booking-info-banner p {
    margin: 0;
    font-size: 0.9rem;
    line-height: 1.5;
}
.booking-info-banner a {
    color: #1565c0;
    font-weight: 600;
    text-decoration: underline;
}
.booking-info-banner a:hover {
    color: #0d47a1;
}

/* Selected date display bar */
.selected-date-display {
    margin-top: 14px;
    padding: 12px 14px;
    background: #f5f5f5;
    border-radius: 6px;
    font-size: 0.95rem;
    color: #333;
    border: 1px solid #e0e0e0;
}

.selected-date-display .selected-date-time {
    font-weight: 700;
    color: #1b5e20;
    font-size: 1.05em;
    background: rgba(76, 175, 80, 0.15);
    padding: 4px 10px;
    border-radius: 6px;
    margin-left: 2px;
    letter-spacing: 0.02em;
}

/* Calendar and Time Selection Container */
.booking-datetime-container {
    display: flex;
    flex-direction: column;
    gap: 20px;
    margin-bottom: 20px;
}

.calendar-container {
    width: 100%;
    background: white;
    border-radius: 8px;
    padding: 20px;
    box-shadow: var(--shadow-sm);
}

.time-slots-container {
    width: 100%;
    background: white;
    border-radius: 8px;
    padding: 20px;
    box-shadow: var(--shadow-sm);
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.time-slots-container.hidden {
    display: none;
}

.time-slots-container h3 {
    margin: 0 0 15px 0;
    color: var(--primary-color);
    font-size: 1.2rem;
}

.time-slot-btn {
    padding: 10px 15px;
    margin: 5px;
    border: 1px solid transparent;
    border-radius: 6px;
    cursor: pointer;
    transition: all 0.2s ease;
    font-size: 0.9rem;
}

.time-slot-btn.available {
    background: #4caf50;
    color: white;
    border-color: #43a047;
}
.time-slot-btn.available:hover {
    background: #43a047;
}
.time-slot-btn.available.active {
    background: #2e7d32;
    border-color: #1b5e20;
    box-shadow: 0 0 0 2px rgba(76, 175, 80, 0.4);
}

.time-slot-btn.unavailable {
    background: #e0e0e0;
    color: #9e9e9e;
    cursor: not-allowed;
    border-color: #bdbdbd;
    text-decoration: line-through;
}

/* Animation */
@keyframes fadeIn {
    from {
        opacity: 0;
        transform: translateY(10px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* Calendar Styles */
.calendar-container {
    background: white;
    border-radius: 12px;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.1);
    padding: 20px;
    margin-bottom: 0;
}

.calendar-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 20px;
}

#calendar-month-year {
    font-size: 1.2rem;
    font-weight: 600;
    color: #333;
}

.calendar-nav-btn {
    background: none;
    border: none;
    font-size: 1.2rem;
    cursor: pointer;
    color: #666;
    padding: 8px 12px;
    border-radius: 8px;
    transition: all 0.2s ease;
}

.calendar-nav-btn:hover {
    background-color: #f5f5f5;
    color: #333;
}

.calendar-weekdays {
    display: grid;
    grid-template-columns: repeat(7, 1fr);
    gap: 8px;
    margin-bottom: 10px;
    text-align: center;
}

.calendar-weekdays div {
    font-weight: 600;
    color: #666;
    font-size: 0.9rem;
    padding: 8px 0;
}

.calendar-days {
    display: grid;
    grid-template-columns: repeat(7, 1fr);
    gap: 8px;
}

.calendar-day {
    aspect-ratio: 1;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1rem;
    cursor: pointer;
    border-radius: 50%;
    transition: all 0.2s ease;
    border: 2px solid transparent;
    background: white;
}

.calendar-day:not(.empty):not(.past):hover {
    background-color: #f5f5f5;
}

.calendar-day.selected {
    background-color: #1a1a1a;
    color: white;
    border-color: #1a1a1a;
}

.calendar-day.today {
    border-color: #333;
    font-weight: 600;
}

.calendar-day.past {
    color: #ccc;
    cursor: not-allowed;
    text-decoration: line-through;
}

.calendar-day.other-month {
    color: #bbb;
    cursor: default;
    pointer-events: none;
    background: transparent;
}

.calendar-day.empty {
    cursor: default;
    pointer-events: none;
    visibility: hidden;
}

/* Time Slots Styles */
.time-slots-container {
    background: white;
    border-radius: 12px;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.1);
    padding: 20px;
    margin-top: 0;
}

.time-slots-container.hidden {
    display: none;
}

.time-slots-container h3 {
    margin: 0 0 12px 0;
    color: #333;
    font-size: 1.2rem;
    font-weight: 700;
    text-align: left;
}

/* Time slots legend (Available / Limited / Fully Booked) */
.time-slots-legend {
    display: flex;
    flex-wrap: wrap;
    gap: 16px 24px;
    margin-bottom: 16px;
    font-size: 0.85rem;
    color: #555;
}
.legend-item {
    display: inline-flex;
    align-items: center;
    gap: 6px;
}
.legend-swatch {
    width: 14px;
    height: 14px;
    border-radius: 3px;
    flex-shrink: 0;
}
.legend-available .legend-swatch { background: #4caf50; }
.legend-limited .legend-swatch { background: #ffc107; }
.legend-booked .legend-swatch { background: #f44336; }

.time-slots-call-msg {
    margin-top: 1rem;
    color: #666;
}

/* Embedded payment section */
.payment-section {
    margin-top: 1.5rem;
    padding-top: 1.5rem;
    border-top: 1px solid var(--border-color, #e9ecef);
}

.payment-section h3 {
    font-size: 1.1rem;
    margin-bottom: 0.5rem;
    color: #333;
}

.payment-section h3 i {
    color: var(--color-accent, #c8914e);
    margin-right: 0.5rem;
}

.payment-loading {
    color: #666;
    font-size: 0.9rem;
    margin: 0;
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.payment-loading i {
    color: var(--color-accent, #c8914e);
}

.payment-element-container {
    background: #f8f9fa;
    border-radius: 8px;
    padding: 1rem;
    min-height: 80px;
}

.payment-message {
    margin-top: 0.75rem;
    font-size: 0.9rem;
}

.payment-message-error {
    color: var(--error-color, #dc3545);
}

.time-slots-empty-msg {
    color: #888;
    margin: 1.5rem 0;
    text-align: center;
    font-size: 0.95rem;
}

.time-slots-pick-style-prompt {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 16px 18px;
    background: #fff8e1;
    border: 1px solid #ffecb3;
    border-radius: 8px;
    color: #5d4037;
    font-size: 0.95rem;
}
.time-slots-pick-style-prompt i {
    color: #f9a825;
    flex-shrink: 0;
}

.estimated-duration-display {
    display: flex;
    align-items: center;
    gap: 12px;
    margin-top: 20px;
    margin-bottom: 4px;
    padding: 16px 20px;
    background: linear-gradient(135deg, #e8f5e9 0%, #c8e6c9 100%);
    border-radius: 10px;
    border: 2px solid #4caf50;
    box-shadow: 0 2px 8px rgba(76, 175, 80, 0.2);
}
.estimated-duration-label {
    font-size: 1rem;
    font-weight: 700;
    color: #1b5e20;
    text-transform: uppercase;
    letter-spacing: 0.04em;
}
.estimated-duration-value {
    font-size: 1.35rem;
    font-weight: 800;
    color: #0d3d0d;
    letter-spacing: 0.02em;
}

.time-slots-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(140px, 1fr));
    gap: 12px;
    padding: 1rem;
}

.time-slot {
    padding: 12px 8px;
    text-align: center;
    background: white;
    border: 1px solid #ddd;
    border-radius: 8px;
    cursor: pointer;
    transition: all 0.2s ease;
    font-size: 0.95rem;
}

.time-slot:not(.unavailable):hover {
    border-color: #333;
    background-color: #f5f5f5;
    transform: translateY(-2px);
    box-shadow: 0 2px 4px rgba(0,0,0,0.1);
}

.time-slot.selected {
    background-color: #333;
    color: white;
    border-color: #333;
    transform: translateY(-2px);
    box-shadow: 0 2px 4px rgba(0,0,0,0.1);
}

.time-slot.unavailable {
    opacity: 0.5;
    cursor: not-allowed;
    background-color: #f5f5f5;
    text-decoration: line-through;
}

/* Responsive Design */
@media (max-width: 768px) {
    .calendar-container {
        padding: 15px;
    }

    .calendar-day {
        font-size: 0.9rem;
    }

    .time-slots-grid {
        grid-template-columns: repeat(auto-fill, minmax(120px, 1fr));
    }

    .time-slot {
        padding: 10px 6px;
        font-size: 0.9rem;
    }
}

@media (max-width: 1200px) {
    .booking-datetime-container {
        flex-direction: column;
        align-items: center;
    }

    .calendar-wrapper,
    .time-slots-container {
        max-width: 800px;
        width: 100%;
    }
}

@media (max-width: 480px) {
    .calendar-day {
        width: 35px;
        height: 35px;
        font-size: 0.9rem;
    }

    .time-slots-grid {
        grid-template-columns: 1fr;
    }
}

@media (max-width: 1400px) {
    .form-section {
        padding: 1.25rem;
    }
}

.time-slots-wrapper {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(120px, 1fr));
    gap: 10px;
    padding: 10px;
    max-height: 400px;
    overflow-y: auto;
}

.time-slots-wrapper::-webkit-scrollbar {
    width: 8px;
}

.time-slots-wrapper::-webkit-scrollbar-track {
    background: var(--gray-100);
    border-radius: 4px;
}

.time-slots-wrapper::-webkit-scrollbar-thumb {
    background: var(--gray-300);
    border-radius: 4px;
}

.time-slots-wrapper::-webkit-scrollbar-thumb:hover {
    background: var(--gray-400);
}

@media (max-width: 768px) {
    .time-slots-wrapper {
        grid-template-columns: repeat(2, 1fr);
        max-height: 300px;
    }
}

.time-slot-btn.concurrent-one {
    background-color: #fff;
    border-color: #ddd;
}

.time-slot-btn.concurrent-one:hover {
    background-color: #f5f5f5;
    border-color: #999;
}

/* Removed lightning bolt icon for cleaner design */

.time-slot-btn.unavailable {
    background-color: #f0f0f0 !important;
    border-color: #ddd !important;
    color: #999 !important;
    cursor: not-allowed !important;
    opacity: 0.6;
    text-decoration: line-through;
    pointer-events: none;
}

.time-slot-btn.unavailable:hover,
.time-slot-btn.unavailable:active,
.time-slot-btn.unavailable:focus {
    background-color: #f0f0f0 !important;
    border-color: #ddd !important;
    transform: none !important;
    box-shadow: none !important;
    cursor: not-allowed !important;
}

.time-slot-btn:disabled {
    opacity: 0.6;
    cursor: not-allowed;
    pointer-events: none;
} 