/* Container styling */
#vt-booking-wrapper {
    width: 100%;
    max-width: 100%;
    margin: 20px 0;
    padding: 20px;
    border: 1px solid #e1e1e1;
    border-radius: 8px;
    background-color: #f9f9f9;
    font-family: sans-serif;
    box-sizing: border-box;
    position: relative;
    z-index: 1;
}
/* While the bundle dropdown is open, lift the whole booking card above any
   neighbouring page sections (Discovery box, video, etc.) that would
   otherwise overlap the open panel. */
#vt-booking-wrapper.vt-dd-open,
#vt-booking-wrapper:has(.vt-dd[data-open="true"]) {
    z-index: 99999;
}

.vt-order-status {
    max-width: 600px;
    margin: 20px auto;
    padding: 20px;
    border-radius: 8px;
    font-family: sans-serif;
}
.vt-order-paid { background: #e8f5e9; border-left: 4px solid #188038; }
.vt-order-pending { background: #fff8e1; border-left: 4px solid #b8860b; }
.vt-order-other { background: #f1f1f1; border-left: 4px solid #888; }

.vt-help-text {
    font-size: 13px;
    color: #555;
    background: #eef6fc;
    border-left: 4px solid #0073aa;
    padding: 8px 10px;
    border-radius: 4px;
}

.vt-bundle-title, .vt-discovery-title {
    margin: 0 0 4px;
}

.vt-bundle-price, .vt-discovery-price {
    font-size: 16px;
    font-weight: bold;
    color: #0073aa;
    margin: 0 0 15px;
}

#vt-price-breakdown {
    margin: 10px 0;
    padding: 10px;
    background: #fff;
    border-radius: 4px;
    border: 1px dashed #ccc;
}

.vt-price-row {
    display: flex;
    justify-content: space-between;
    align-items: center;
    font-size: 14px;
}

.vt-price-original {
    text-decoration: line-through;
    color: #888;
}

.vt-price-discounted {
    font-weight: bold;
    color: #188038;
    font-size: 16px;
}

#vt-discovery-wrapper {
    max-width: 600px;
    margin: 20px auto;
    padding: 20px;
    border: 1px solid #e1e1e1;
    border-radius: 8px;
    background-color: #f9f9f9;
    font-family: sans-serif;
}

#vt-discovery-form select,
#vt-discovery-form input {
    width: 100%;
    padding: 10px;
    margin: 10px 0;
    border: 1px solid #ccc;
    border-radius: 4px;
    box-sizing: border-box;
}

/* Form layout */
#vt-booking-form select,
#vt-booking-form input[type="text"],
#vt-booking-form input[type="email"],
#vt-booking-form input[type="date"],
#vt-booking-form input[type="number"],
#vt-booking-form input[type="tel"] {
    width: 100%;
    padding: 10px;
    margin: 10px 0;
    border: 1px solid #ccc;
    border-radius: 4px;
    box-sizing: border-box;
}

/* Dynamic rows styling */
.booking-row {
    margin-bottom: 15px;
    padding: 10px;
    background: #fff;
    border-left: 4px solid #0073aa;
    border-radius: 4px;
}

.vt-row-label {
    display: block;
    font-weight: bold;
    font-size: 13px;
    margin-bottom: 4px;
    width: auto;
}

.vt-row-inputs {
    display: flex;
    gap: 10px;
}

.vt-row-inputs input {
    margin: 0;
}

/* Button styling */
#submit-booking,
#discovery-submit-booking {
    background-color: #0073aa;
    color: white;
    padding: 12px 20px;
    border: none;
    border-radius: 4px;
    cursor: pointer;
    font-weight: bold;
    width: 100%;
}

#submit-booking:hover,
#discovery-submit-booking:hover {
    background-color: #005177;
}

/* Message styling */
#booking-message,
#discovery-booking-message {
    margin-top: 15px;
    padding: 10px;
    text-align: center;
}

.error-msg { color: #d93025; }
.success-msg { color: #188038; }

/* Admin dashboard */
.vt-admin-wrap table.widefat td,
.vt-admin-wrap table.widefat th { padding: 8px 10px; }
.vt-status-paid { color: #188038; font-weight: bold; }
.vt-status-pending_payment { color: #b8860b; font-weight: bold; }
.vt-status-expired, .vt-status-cancelled { color: #d93025; font-weight: bold; }

/* ---- Calendar-week booking blocks (v2 week-based model) ---- */
.vt-week-group {
    margin: 18px 0;
}

.vt-week-head {
    font-size: 15px;
    margin: 0 0 8px;
    color: #222;
    display: flex;
    align-items: center;
    flex-wrap: wrap;
    gap: 6px;
}

.vt-week-range {
    color: #666;
    font-size: 13px;
}

.vt-week-partial {
    display: inline-block;
    font-size: 12px;
    color: #b8860b;
    background: #fff8e1;
    padding: 1px 8px;
    border-radius: 10px;
}

/* The week block: sessions sit side-by-side and wrap on smaller screens. */
.vt-week-block {
    display: flex;
    flex-wrap: wrap;
    gap: 12px;
    padding: 12px 14px;
    background: #fff;
    border: 1px solid #e1e1e1;
    border-left: 4px solid #0073aa;
    border-radius: 6px;
}

.vt-week-row {
    flex: 1 1 200px;
    min-width: 200px;
    margin: 0;
    padding: 0;
    background: transparent;
    border: none;
    border-radius: 0;
}

.vt-week-row .vt-row-label {
    display: block;
    font-size: 12px;
    font-weight: bold;
    color: #555;
    margin-bottom: 4px;
}

.vt-week-row .vt-row-inputs {
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.vt-week-row .v-date,
.vt-week-row .v-time {
    width: 100%;
    margin: 0;
}

@media (max-width: 480px) {
    .vt-week-row {
        flex: 1 1 100%;
        min-width: 100%;
    }
}

/* ---- Start-date + flatpickr calendar fields (v2.2) ---- */
#vt-start-date-wrap {
    margin: 10px 0 4px;
}

.vt-start-label {
    display: block;
    font-weight: bold;
    font-size: 13px;
    margin-bottom: 4px;
    color: #333;
}

/* Make flatpickr day fields match the native selects/inputs */
#vt-start-date,
.vt-week-row .v-date,
.vt-week-row input.flatpickr-input {
    width: 100%;
    padding: 10px;
    margin: 0;
    border: 1px solid #ccc;
    border-radius: 4px;
    box-sizing: border-box;
    background: #fff;
    cursor: pointer;
    font-size: 14px;
}

/* flatpickr's altInput sits in place of the real (hidden) input */
.vt-week-row .flatpickr-input.form-control,
#vt-start-date.flatpickr-input {
    background: #fff;
}

/* clicking anywhere in the field opens the calendar (no text caret) */
#vt-start-date,
.vt-week-row .v-date {
    caret-color: transparent;
}

/* =========================================================
   Admin dashboard (v2.2) — professional bookings screen
   ========================================================= */
.vt-admin-title { margin-top: 10px; }
.vt-admin-sub { color: #555; margin-bottom: 16px; }

/* Summary cards */
.vt-cards {
    display: flex;
    flex-wrap: wrap;
    gap: 14px;
    margin: 0 0 20px;
}
.vt-card {
    flex: 1 1 160px;
    background: #fff;
    border: 1px solid #e2e4e7;
    border-left: 4px solid #646970;
    border-radius: 6px;
    padding: 14px 16px;
    display: flex;
    flex-direction: column;
    gap: 2px;
}
.vt-card-num { font-size: 26px; font-weight: 700; line-height: 1.1; color: #1d2327; }
.vt-card-label { font-size: 12px; color: #646970; text-transform: uppercase; letter-spacing: .3px; }
.vt-card-green { border-left-color: #188038; }
.vt-card-green .vt-card-num { color: #188038; }
.vt-card-blue { border-left-color: #2271b1; }
.vt-card-blue .vt-card-num { color: #2271b1; }
.vt-card-red { border-left-color: #d63638; }
.vt-card-red .vt-card-num { color: #d63638; }

/* Bookings table polish */
.vt-bookings-table { border-radius: 6px; overflow: hidden; }
.vt-bookings-table th { font-weight: 600; }
.vt-actions-cell { white-space: nowrap; }

/* Status pills */
.vt-pill {
    display: inline-block;
    padding: 3px 10px;
    border-radius: 12px;
    font-size: 12px;
    font-weight: 600;
    line-height: 1.6;
}
.vt-pill-green { background: #e6f4ea; color: #188038; }
.vt-pill-blue  { background: #e7f0fa; color: #2271b1; }
.vt-pill-red   { background: #fce8e8; color: #d63638; }

/* Session list dots */
.vt-session-list { margin: 6px 0 0; }
.vt-session-list li { margin: 2px 0; font-size: 13px; }
.vt-session-list em { color: #888; font-style: normal; font-size: 12px; }
.vt-dot { display: inline-block; width: 8px; height: 8px; border-radius: 50%; margin-right: 6px; vertical-align: middle; }
.vt-dot-green { background: #188038; }
.vt-dot-blue  { background: #2271b1; }
.vt-dot-red   { background: #d63638; }

/* Email modal */
.vt-modal {
    position: fixed;
    inset: 0;
    background: rgba(0,0,0,0.45);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 100000;
}
.vt-modal-box {
    background: #fff;
    width: 100%;
    max-width: 520px;
    border-radius: 8px;
    padding: 0 0 18px;
    box-shadow: 0 10px 40px rgba(0,0,0,0.25);
    max-height: 90vh;
    overflow-y: auto;
}
.vt-modal-head {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 16px 20px;
    border-bottom: 1px solid #e2e4e7;
}
.vt-modal-head h2 { margin: 0; font-size: 18px; }
.vt-modal-close {
    background: none; border: none; font-size: 24px; line-height: 1;
    cursor: pointer; color: #646970;
}
.vt-modal-box form { padding: 16px 20px 0; }
.vt-field-label {
    display: block; font-weight: 600; font-size: 13px;
    margin: 12px 0 4px; color: #1d2327;
}
.vt-modal-box input[type="email"],
.vt-modal-box input[type="text"],
.vt-modal-box select,
.vt-modal-box textarea {
    width: 100%;
    padding: 8px 10px;
    border: 1px solid #8c8f94;
    border-radius: 4px;
    box-sizing: border-box;
    font-size: 14px;
}
.vt-modal-box textarea { resize: vertical; }
.vt-modal-actions {
    display: flex;
    justify-content: flex-end;
    gap: 10px;
    margin-top: 18px;
}

/* ---- Admin graph (v2.3) ---- */
.vt-graph-panel {
    background: #fff;
    border: 1px solid #e2e4e7;
    border-radius: 8px;
    padding: 16px 18px;
    margin: 8px 0 20px;
}
.vt-graph-head {
    display: flex;
    align-items: center;
    justify-content: space-between;
    flex-wrap: wrap;
    gap: 10px;
    margin-bottom: 12px;
}
.vt-graph-head h2 { margin: 0; font-size: 16px; }
.vt-graph-toggle {
    display: inline-flex;
    border: 1px solid #c3c4c7;
    border-radius: 6px;
    overflow: hidden;
}
.vt-toggle-btn {
    background: #fff;
    border: none;
    padding: 6px 16px;
    font-size: 13px;
    cursor: pointer;
    color: #2c3338;
}
.vt-toggle-btn + .vt-toggle-btn { border-left: 1px solid #c3c4c7; }
.vt-toggle-btn.active { background: #2271b1; color: #fff; }
.vt-graph-canvas-wrap { position: relative; height: 280px; }
.vt-graph-empty { color: #646970; text-align: center; padding: 40px 0; }

/* ---- "Repeat sessions for upcoming weeks" toggle card (v2.7) ---- */
#vt-repeat-wrap {
    margin: 16px 0 8px;
    background: #f4f9fd;
    border: 1px solid #d6e4f0;
    border-left: 4px solid #0073aa;
    border-radius: 8px;
    overflow: hidden;
}

/* The whole card is the clickable label. */
#vt-booking-form #vt-repeat-wrap .vt-repeat-label {
    display: flex;
    align-items: flex-start;
    gap: 12px;
    margin: 0;
    padding: 14px 16px;
    cursor: pointer;
    float: none;                 /* beat themes that float labels */
    width: auto;
    font-weight: normal;
    text-align: left;
    transition: background 0.15s ease;
}
#vt-booking-form #vt-repeat-wrap .vt-repeat-label:hover {
    background: #eaf3fb;
}

/* Hide the real checkbox but keep it focusable/accessible.
   (Uses an ID selector so the global "#vt-booking-form input" rule can't win.) */
#vt-booking-form #vt-repeat-wrap input#vt-repeat-weeks {
    position: absolute;
    opacity: 0;
    width: 1px;
    height: 1px;
    margin: 0;
    padding: 0;
    border: 0;
}

/* The visible custom checkbox. */
#vt-booking-form #vt-repeat-wrap .vt-repeat-box {
    flex: 0 0 auto;
    width: 20px;
    height: 20px;
    margin-top: 1px;
    border: 2px solid #b6c9da;
    border-radius: 5px;
    background: #fff;
    position: relative;
    transition: background 0.15s ease, border-color 0.15s ease;
}

/* Checkmark (drawn with a rotated border, so no icon font needed). */
#vt-booking-form #vt-repeat-wrap .vt-repeat-box::after {
    content: "";
    position: absolute;
    left: 6px;
    top: 2px;
    width: 5px;
    height: 10px;
    border: solid #fff;
    border-width: 0 2px 2px 0;
    transform: rotate(45deg) scale(0);
    transition: transform 0.15s ease;
}

#vt-booking-form #vt-repeat-wrap input#vt-repeat-weeks:checked ~ .vt-repeat-box {
    background: #0073aa;
    border-color: #0073aa;
}
#vt-booking-form #vt-repeat-wrap input#vt-repeat-weeks:checked ~ .vt-repeat-box::after {
    transform: rotate(45deg) scale(1);
}
#vt-booking-form #vt-repeat-wrap input#vt-repeat-weeks:focus-visible ~ .vt-repeat-box {
    box-shadow: 0 0 0 3px rgba(0, 115, 170, 0.25);
}

/* Text block sits to the right of the box. */
#vt-booking-form #vt-repeat-wrap .vt-repeat-text {
    display: flex;
    flex-direction: column;
    gap: 3px;
    min-width: 0;
    text-align: left;
    float: none;
}
#vt-booking-form #vt-repeat-wrap .vt-repeat-title {
    font-weight: 600;
    font-size: 14px;
    color: #1d2733;
    line-height: 1.35;
}
#vt-booking-form #vt-repeat-wrap .vt-repeat-hint {
    font-size: 12.5px;
    color: #5b6b7a;
    line-height: 1.45;
    margin: 0;
    font-weight: normal;
}

/* ---- Booked-slot awareness (v2.6) ---- */
.vt-loading {
    padding: 14px;
    color: #5b6b7a;
    font-size: 14px;
    text-align: center;
}
/* Greyed-out "already booked" options */
.vt-week-row .v-time option:disabled {
    color: #b0b0b0;
}

/* ================================================================
   Custom two-line bundle dropdown (v3.0)
   ================================================================ */
/* Hide the real <select> but keep it in the DOM for form subm/logic. */
.vt-native-hidden {
    position: absolute !important;
    width: 1px !important;
    height: 1px !important;
    padding: 0 !important;
    margin: -1px !important;
    overflow: hidden !important;
    clip: rect(0, 0, 0, 0) !important;
    white-space: nowrap !important;
    border: 0 !important;
}

#vt-bundle-label {
    display: block;
    margin: 0 0 6px;
    font-size: 15px;
    color: #333;
}

.vt-dd {
    position: relative;
    width: 100%;
    margin: 0 0 10px;
    font-family: inherit;
    z-index: 50;
}
/* When open, lift the whole control above any later sections that build
   their own stacking context (theme transforms, videos, etc.). */
.vt-dd[data-open="true"] {
    z-index: 99999;
}

/* Trigger looks like a select box */
.vt-dd-trigger {
    width: 100%;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 10px;
    background: #fff;
    border: 1px solid #ccc;
    border-radius: 6px;
    padding: 12px 14px;
    cursor: pointer;
    text-align: left;
    font-size: 15px;
    color: #222;
    line-height: 1.35;
    transition: border-color 0.15s ease, box-shadow 0.15s ease;
}
.vt-dd-trigger:hover { border-color: #999; }
.vt-dd[data-open="true"] .vt-dd-trigger {
    border-color: #0073aa;
    box-shadow: 0 0 0 3px rgba(0, 115, 170, 0.15);
}

.vt-dd-trigger-text { flex: 1 1 auto; min-width: 0; }
.vt-dd-trigger-text .vt-opt-l1 { display: block; font-weight: 600; font-size: 15px; }
.vt-dd-trigger-text .vt-opt-l2 { display: block; font-size: 12.5px; color: #6b7684; margin-top: 1px; }

/* Caret */
.vt-dd-caret {
    flex: 0 0 auto;
    width: 0; height: 0;
    border-left: 5px solid transparent;
    border-right: 5px solid transparent;
    border-top: 6px solid #666;
    transition: transform 0.15s ease;
}
.vt-dd[data-open="true"] .vt-dd-caret { transform: rotate(180deg); }

/* Panel */
.vt-dd-panel {
    position: absolute;
    top: calc(100% + 4px);
    left: 0;
    right: 0;
    z-index: 100000;
    margin: 0;
    padding: 4px;
    list-style: none;
    background: #fff;
    border: 1px solid #cfd6dd;
    border-radius: 8px;
    box-shadow: 0 8px 24px rgba(0, 0, 0, 0.12);
    max-height: 340px;
    overflow-y: auto;
    display: none;
}
.vt-dd[data-open="true"] .vt-dd-panel { display: block; }

/* Options */
.vt-dd-opt {
    padding: 10px 12px;
    border-radius: 6px;
    cursor: pointer;
    line-height: 1.4;
    transition: background 0.12s ease;
}
.vt-dd-opt + .vt-dd-opt { border-top: 1px solid #f0f2f4; }
.vt-dd-opt:hover { background: #f2f7fc; }
.vt-dd-opt.vt-selected { background: #1a73e8; }
.vt-dd-opt.vt-selected .vt-opt-l1,
.vt-dd-opt.vt-selected .vt-opt-l2,
.vt-dd-opt.vt-selected del { color: #fff; }

.vt-dd-placeholder {
    color: #6b7684;
    font-size: 14px;
}
.vt-dd-placeholder:hover { background: #f2f7fc; }

/* Two lines inside each option */
.vt-opt-l1 {
    display: block;
    font-weight: 600;
    font-size: 15px;
    color: #1d2733;
}
.vt-opt-l2 {
    display: block;
    font-size: 12.5px;
    color: #6b7684;
    margin-top: 2px;
}
.vt-opt-count { font-weight: 600; }

/* Strikethrough original price */
.vt-dd del,
.vt-dd-trigger del {
    color: #9aa4ad;
    text-decoration: line-through;
    margin-right: 2px;
}
.vt-opt-now { font-weight: 600; }
