/* Booking Modal Styles */
.tour-booking-modal {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.5);
    z-index: 9999;
    overflow-y: auto;
}

.booking-modal-content {
    position: relative;
    width: 90%;
    max-width: 800px;
    margin: 30px auto;
    background-color: transparent;
    padding: 20px;
    border-radius: 0;
    border: none !important;
    box-shadow: 0 0 20px rgba(0, 0, 0, 0.3);
}

.booking-modal-close {
    position: absolute;
    top: 10px;
    right: 10px;
    font-size: 24px;
    font-weight: bold;
    color: #888;
    cursor: pointer;
}

.booking-modal-close:hover {
    color: #333;
}

.booking-modal-content h2 {
    margin-top: 0;
    margin-bottom: 20px;
    color: #333;
    font-size: 24px;
    border: none !important;
    padding-bottom: 10px;
}

/* Calendar Styles */
.calendar-wrapper {
    margin-bottom: 20px;
}

.calendar-wrapper h3 {
    margin-top: 0;
    margin-bottom: 10px;
    font-size: 18px;
    color: #333;
}

#calendar-container {
    background-color: transparent;
    padding: 10px;
    border-radius: 0;
    border: none !important;
}

.flatpickr-calendar {
    background-color: transparent;
    box-shadow: none;
    width: 100%;
    max-width: 100%;
}

/* Normal dates */
.flatpickr-day {
    color: #333 !important;
    border-radius: 0 !important;
}

/* Available dates */
.flatpickr-day.flatpickr-enabled {
    background-color: white;
    color: #333;
    cursor: pointer !important;
}

/* Unavailable dates */
.flatpickr-day.flatpickr-disabled {
    background-color: #f5f5f5 !important;
    color: #ccc !important;
    cursor: not-allowed !important;
    text-decoration: none !important;
}

/* Selected date */
.flatpickr-day.selected {
    background-color: #0073aa !important;
    color: #fff !important;
    border: none !important;
}

/* Calendar header */
.flatpickr-current-month {
    padding: 10px 0;
    font-size: 16px;
    font-weight: bold;
}

.flatpickr-monthDropdown-months {
    font-weight: bold;
}

/* Navigation arrows */
.flatpickr-prev-month,
.flatpickr-next-month {
    padding: 10px;
}

.flatpickr-prev-month svg,
.flatpickr-next-month svg {
    fill: #666;
}

.flatpickr-prev-month:hover svg,
.flatpickr-next-month:hover svg {
    fill: #0073aa;
}

/* Loading state */
.calendar-loading {
    padding: 20px;
    text-align: center;
    color: #666;
    background-color: white;
    border: none;
    border-radius: 0;
}

.loading-spinner {
    display: inline-block;
    width: 20px;
    height: 20px;
    border: 2px solid rgba(0, 115, 170, 0.2);
    border-top-color: #0073aa;
    border-radius: 50%;
    margin-right: 10px;
    animation: spin 1s linear infinite;
}

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

/* Time Slots Styles */
.time-slots-section {
    margin-top: 20px;
    margin-bottom: 20px;
}

.time-slots-section h3 {
    margin-top: 0;
    margin-bottom: 10px;
    font-size: 18px;
    color: #333;
}

.day-slots {
    border: none !important;
    border-radius: 0;
    overflow: hidden;
}

.day-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 15px;
    background: #f8f9fa;
    border: none !important;
    border-radius: 0;
}

.day-header a {
    color: #2271b1;
    text-decoration: none;
    display: flex;
    align-items: center;
    gap: 5px;
}

.day-header .disabled {
    color: #ccc;
    cursor: not-allowed;
}

.current-day {
    font-weight: 500;
    color: #1d2327;
}

.prev-day,
.next-day {
    color: #0073aa;
    cursor: pointer;
    text-decoration: none;
    font-size: 14px;
}

.prev-day:hover,
.next-day:hover {
    text-decoration: underline;
}

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

.time-slot {
    background: transparent;
    border: none;
    border-radius: 4px;
    padding: 15px;
    text-align: center;
    cursor: pointer;
    transition: all 0.2s ease;
}

.time-slot:not(.unavailable):hover {
    border: none !important;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
}

.time-slot.selected {
    background: #2271b1;
    border: none !important;
    color: #fff;
}

.time-slot.selected .spots-available {
    color: rgba(255, 255, 255, 0.8);
}

.time-slot.unavailable {
    background: #f8f9fa;
    border: none !important;
    cursor: not-allowed;
    opacity: 0.7;
}

.time {
    display: block;
    font-size: 16px;
    font-weight: 500;
    margin-bottom: 5px;
}

.spots-available {
    display: block;
    font-size: 12px;
    color: #666;
}

.spots-unavailable {
    display: block;
    font-size: 12px;
    color: var(--tt-pink-500);
}

.no-times-message {
    grid-column: 1/-1;
    text-align: center;
    padding: 20px;
    color: #666;
}

/* Form Styles */
.booking-date-section {
    margin-bottom: 20px;
    padding: 15px;
    background-color: #f9f9f9;
    border-radius: 4px;
}

.select-date-prompt {
    display: block;
}

.selected-date-info {
    display: none;
    font-weight: bold;
    color: #0073aa;
}

.booking-date-section.date-selected .select-date-prompt {
    display: none;
}

.booking-date-section.date-selected .selected-date-info {
    display: block;
}

.form-group {
    margin-bottom: 15px;
}

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

.form-group input,
.form-group textarea {
    width: 100%;
    padding: 10px;
    border: none !important;
    border-radius: 0;
    font-size: 14px;
}

.form-group textarea {
    height: 100px;
    resize: vertical;
}

.form-submit {
    margin-top: 20px;
}

.submit-booking-btn {
    background-color: #0073aa;
    color: #fff;
    border: none !important;
    padding: 12px 24px;
    font-size: 16px;
    font-weight: bold;
    border-radius: 0;
    cursor: pointer;
    transition: background-color 0.2s ease;
}

.submit-booking-btn:hover {
    background-color: #005f8b;
}

/* Message Styles */
#booking-message {
    margin-bottom: 20px;
    padding: 15px;
    border-radius: 0;
    display: none;
}

#booking-message .message-content {
    display: flex;
    align-items: flex-start;
}

#booking-message i {
    margin-right: 10px;
    font-size: 20px;
}

#booking-message p {
    margin: 0;
}

.success-container {
    background-color: #d4edda;
    border-left: 4px solid #28a745;
    color: #155724;
}

.error-container {
    background-color: var(--tt-pink-100);
    border-left: 4px solid var(--tt-pink-500);
    color: var(--tt-pink-700);
}

.processing-container {
    background-color: #e2f3fd;
    border-left: 4px solid #0073aa;
    color: #004d73;
}

.cancel-button {
    background-color: #6c757d;
    color: #fff;
    border: none;
    padding: 6px 12px;
    font-size: 14px;
    border-radius: 0;
    cursor: pointer;
    margin-left: 15px;
}

.cancel-button:hover {
    background-color: #5a6268;
}

/* Mobile Responsive Styles */
@media (max-width: 768px) {
    .booking-modal-content {
        width: 95%;
        padding: 15px;
    }

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

    .flatpickr-calendar {
        font-size: 14px;
    }
}

/* Basic Date Picker (Fallback) */
.basic-date-picker {
    width: 100%;
    padding: 10px;
    border: 1px solid #ddd;
    border-radius: 0;
    font-size: 16px;
}

/* Add these styles for error messages */
.error-message {
    padding: 15px;
    background-color: #f8d7da;
    border: 1px solid #f5c6cb;
    border-radius: 0;
    color: #721c24;
    margin: 10px 0;
}

/* Booking Form Styles - Unified for both popup and inline display */

/* Base form styles */
.tt-booking-form {
    max-width: 800px;
    margin: 0 auto;
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Oxygen-Sans, Ubuntu, Cantarell, "Helvetica Neue", sans-serif;
}

/* Steps system */
.booking-step {
    display: none;
    background: transparent;
    border-radius: 0;
    padding: 20px;
    margin-bottom: 20px;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.1);
}

.booking-step.active {
    display: block;
}

.booking-step h3 {
    margin-top: 0;
    margin-bottom: 20px;
    padding-bottom: 10px;
    border-bottom: 1px solid #eee;
    font-size: 18px;
    border-radius: 0;
}

/* Date picker */
.tour-datepicker {
    margin-bottom: 20px;
}

.ui-datepicker {
    width: 100%;
    padding: 0;
    border: none;
    font-size: 14px;
}

.ui-datepicker-header {
    background: #f5f5f5 !important;
    border: 1px solid #ddd !important;
    border-radius: 0 !important;
}

.ui-datepicker-calendar {
    background: transparent;
    border: 1px solid #ddd;
    border-top: none;
    border-radius: 0;
}

.ui-datepicker th {
    padding: 7px 0;
    background: #f5f5f5;
    color: #333;
    font-weight: normal;
}

.ui-datepicker td {
    padding: 3px !important;
}

.ui-datepicker td a {
    text-align: center !important;
    padding: 8px !important;
    border-radius: 50% !important;
    border: none !important;
    background: transparent;
    color: #333;
}

.ui-datepicker td a:hover {
    background: #f0f0f0 !important;
}

.ui-datepicker td a.ui-state-active {
    background: #00a884 !important;
    color: #fff !important;
}

/* Time slots */
.time-slots-container {
    margin: 20px 0;
    border: 1px solid #e0e0e0;
    border-radius: 4px;
    overflow: hidden;
}

.time-columns {
    display: flex;
}

.time-column {
    flex: 1;
    border-right: 1px solid #e0e0e0;
}

.time-column:last-child {
    border-right: none;
}

.time-column h4 {
    margin: 0;
    padding: 10px;
    background: #f5f5f5;
    text-align: center;
    font-size: 14px;
    border-bottom: 1px solid #e0e0e0;
}

.time-column.selected h4 {
    background: #00a884;
    color: white;
}

.time-slots-list {
    padding: 15px;
    max-height: 300px;
    overflow-y: auto;
}

.time-slot {
    margin-bottom: 8px;
    padding: 10px;
    text-align: center;
    background: #f9f9f9;
    border: 1px solid #e0e0e0;
    border-radius: 4px;
    cursor: pointer;
    transition: all 0.2s;
}

.time-slot:hover {
    background: #f0f0f0;
}

.time-slot.selected {
    background: #00a884;
    color: white;
    border-color: #00a884;
}

/* Form fields */
.form-field {
    margin-bottom: 15px;
}

.form-field label {
    display: block;
    margin-bottom: 5px;
    font-weight: 500;
}

.form-field input,
.form-field textarea,
.form-field select {
    width: 100%;
    padding: 10px;
    border: 1px solid #ddd;
    border-radius: 4px;
    box-sizing: border-box;
}

.form-field input:focus,
.form-field textarea:focus {
    border-color: #0073aa;
    outline: none;
}

/* Buttons - Blue next step buttons */
.step-buttons {
    margin-top: 20px;
    display: flex;
    justify-content: space-between;
}

.next-step,
.prev-step,
.submit-booking {
    padding: 10px 20px;
    border: none;
    border-radius: 4px;
    cursor: pointer;
    font-weight: 500;
    font-size: 14px;
}

.next-step,
.submit-booking {
    background: #dc3545;
    color: white;
}

.next-step:hover,
.submit-booking:hover {
    background: #c82333;
}

.prev-step {
    background: #f0f0f0;
    color: #333;
}

.next-step:disabled {
    opacity: 0.5;
    cursor: not-allowed;
}

/* Booking Summary */
.booking-summary {
    background: #f7f7f7;
    padding: 15px;
    margin: 20px 0;
    border-radius: 4px;
}

.booking-summary h4 {
    margin-top: 0;
    padding-bottom: 8px;
    margin-bottom: 10px;
    border-bottom: 1px solid #e0e0e0;
}

/* Popup specific styles */
.booking-popup {
    display: none;
    position: fixed;
    z-index: 9999;
    left: 0;
    top: 0;
    width: 100%;
    height: 100%;
    overflow: auto;
    background-color: rgba(0, 0, 0, 0.5);
}

.booking-popup-content {
    background-color: transparent;
    margin: 50px auto;
    border-radius: 5px;
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.3);
    width: 90%;
    max-width: 800px;
    max-height: 90vh;
    overflow-y: auto;
    position: relative;
}

.close-popup {
    color: #777;
    float: right;
    font-size: 28px;
    font-weight: bold;
    cursor: pointer;
    line-height: 1;
}

.close-popup:hover {
    color: #333;
}

body.modal-open {
    overflow: hidden;
}

/* Success message */
.booking-success {
    background: #e7f5e9;
    border-left: 4px solid #46b450;
    padding: 20px;
    margin: 20px 0;
    border-radius: 4px;
}

.booking-success h3 {
    margin-top: 0;
    color: #1e8b26;
}

/* Mobile responsiveness */
@media (max-width: 767px) {
    .time-columns {
        flex-direction: column;
    }

    .time-column {
        border-right: none;
        border-bottom: 1px solid #e0e0e0;
    }

    .time-column:last-child {
        border-bottom: none;
    }

    .booking-popup-content {
        margin: 20px auto;
        width: 95%;
    }
}

/* Hide all other forms that might conflict */
.wpcf7-form,
.wpcf7,
div[role="form"].wpcf7,
form.booking-form:not(#booking-form) {
    display: none !important;
}

/* Payment Step Styles */
.payment-summary {
    background-color: #f8f9fa;
    border-radius: 6px;
    padding: 20px;
    margin-bottom: 30px;
    border: 1px solid #e3e3e3;
}

.payment-summary h4 {
    margin-top: 0;
    margin-bottom: 15px;
    font-size: 18px;
    border-bottom: 1px solid #e3e3e3;
    padding-bottom: 10px;
}

.payment-details p {
    margin: 8px 0;
    display: flex;
    justify-content: space-between;
}

.payment-total {
    font-size: 18px;
    margin-top: 15px !important;
    padding-top: 10px;
    border-top: 1px solid #e3e3e3;
}

.payment-methods {
    margin-bottom: 30px;
}

.payment-methods h4 {
    margin-bottom: 15px;
    font-size: 16px;
}

.payment-method {
    background-color: transparent;
    border: 1px solid #ddd;
    border-radius: 6px;
    margin-bottom: 15px;
    overflow: hidden;
}

.payment-method label {
    display: flex;
    align-items: center;
    padding: 15px;
    cursor: pointer;
    width: 100%;
    margin: 0;
}

.payment-method input[type="radio"] {
    margin-right: 10px;
}

.payment-label {
    font-weight: 500;
    flex: 1;
}

.payment-icons {
    display: flex;
    gap: 5px;
}

.payment-icons i {
    font-size: 24px;
}

.payment-method-form {
    padding: 15px;
    border-top: 1px solid #eee;
    background-color: #f9f9f9;
}

#card-element {
    border: 1px solid #ddd;
    padding: 12px;
    border-radius: 4px;
    background: transparent;
}

#card-errors {
    color: var(--tt-pink-500);
    font-size: 14px;
    margin-top: 10px;
}

.payment-button {
    background-color: #28a745;
    border: none;
    color: white;
    padding: 12px 25px;
    border-radius: 4px;
    font-weight: 500;
    cursor: pointer;
    transition: background-color 0.2s;
}

.payment-button:hover {
    background-color: #218838;
}

.payment-security {
    font-size: 13px;
    color: #6c757d;
    text-align: center;
    margin-top: 20px;
}

.payment-security i {
    color: #28a745;
    margin-right: 5px;
}

/* Confirmation Styles */
.booking-confirmation {
    text-align: center;
    padding: 30px 20px;
}

.confirmation-icon {
    font-size: 60px;
    color: #28a745;
    margin-bottom: 20px;
}

.booking-confirmation h3 {
    font-size: 24px;
    margin-bottom: 15px;
    color: #28a745;
}

.confirmation-message {
    font-size: 16px;
    margin-bottom: 25px;
}

.confirmation-details {
    background-color: #f8f9fa;
    border-radius: 6px;
    padding: 20px;
    margin: 0 auto 25px;
    max-width: 400px;
    text-align: left;
    border: 1px solid #e3e3e3;
}

.confirmation-details p {
    margin: 8px 0;
    display: flex;
    justify-content: space-between;
}

.confirmation-email {
    font-style: italic;
    color: #6c757d;
    margin-bottom: 25px;
}

.confirmation-actions {
    margin-top: 20px;
}

.confirmation-actions .button {
    display: inline-block;
    padding: 10px 20px;
    background-color: #0073aa;
    color: white;
    text-decoration: none;
    border-radius: 4px;
    font-weight: 500;
}

.confirmation-actions .button:hover {
    background-color: #005f8b;
}