/* Tour Booking Pro — Public Styles
   CSS custom properties are injected by JS after page load */

.tbp-booking-wrap {
    --tbp-primary:   #2563eb;
    --tbp-secondary: #1e40af;
    --tbp-accent:    #f59e0b;
    --tbp-text:      #1f2937;
    --tbp-bg:        #ffffff;
    --tbp-radius:    8px;
    --tbp-shadow:    0 2px 12px rgba(0,0,0,.10);
    --tbp-font-size: 16px;
    --tbp-font:      inherit;

    font-family: var(--tbp-font);
    font-size:   var(--tbp-font-size);
    color:       var(--tbp-text);
    background:  var(--tbp-bg);
    max-width:   640px;
    margin:      0 auto;
    padding:     24px;
    border-radius: var(--tbp-radius);
    box-shadow:  var(--tbp-shadow);
    position:    relative;
}

/* Steps */
.tbp-step { display: none; }
.tbp-step.tbp-active { display: block; animation: tbpFadeIn .25s ease; }
@keyframes tbpFadeIn { from { opacity:0; transform:translateY(6px); } to { opacity:1; transform:none; } }

/* Title */
.tbp-title {
    margin: 0 0 20px;
    font-size: 1.5em;
    color: var(--tbp-primary);
    font-weight: 700;
}

/* Calendar header */
.tbp-calendar-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 12px;
}
.tbp-cal-month-label {
    font-weight: 600;
    font-size: 1.1em;
}
.tbp-cal-nav {
    background: none;
    border: 1px solid var(--tbp-primary);
    color: var(--tbp-primary);
    border-radius: 4px;
    cursor: pointer;
    font-size: 1.4em;
    line-height: 1;
    padding: 2px 10px;
    transition: background .2s, color .2s;
}
.tbp-cal-nav:hover {
    background: var(--tbp-primary);
    color: #fff;
}

/* Day names row */
.tbp-day-names {
    display: grid;
    grid-template-columns: repeat(7, 1fr);
    gap: 2px;
    margin-bottom: 4px;
}
.tbp-day-name {
    text-align: center;
    font-size: .75em;
    font-weight: 600;
    color: #6b7280;
    padding: 4px 0;
}

/* Days grid */
.tbp-days {
    display: grid;
    grid-template-columns: repeat(7, 1fr);
    gap: 4px;
}
.tbp-day {
    aspect-ratio: 1;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 6px;
    font-size: .9em;
    cursor: default;
    position: relative;
    border: 1px solid transparent;
    transition: background .15s, border-color .15s;
}
.tbp-day.tbp-empty { background: transparent; }
.tbp-day.tbp-past  { color: #d1d5db; }
.tbp-day.tbp-available {
    background: rgba(37,99,235,.08);
    border-color: rgba(37,99,235,.25);
    cursor: pointer;
    font-weight: 600;
}
.tbp-day.tbp-available:hover,
.tbp-day.tbp-selected {
    background: var(--tbp-primary);
    color: #fff;
    border-color: var(--tbp-primary);
}
.tbp-day.tbp-today {
    border-color: var(--tbp-accent);
}
.tbp-day-dot {
    position: absolute;
    bottom: 3px;
    left: 50%;
    transform: translateX(-50%);
    width: 5px;
    height: 5px;
    border-radius: 50%;
    background: var(--tbp-primary);
}
.tbp-day.tbp-selected .tbp-day-dot { background: #fff; }

/* Legend */
.tbp-calendar-legend {
    margin-top: 10px;
    font-size: .8em;
    color: #6b7280;
    display: flex;
    align-items: center;
    gap: 6px;
}
.tbp-legend-dot {
    display: inline-block;
    width: 8px;
    height: 8px;
    border-radius: 50%;
    background: var(--tbp-primary);
}

/* Back button */
.tbp-back {
    background: none;
    border: none;
    color: var(--tbp-primary);
    cursor: pointer;
    font-size: .9em;
    padding: 0;
    margin-bottom: 16px;
    text-decoration: underline;
}
.tbp-back:hover { opacity: .75; }

/* Slots */
.tbp-slots-title {
    font-size: 1.1em;
    margin: 0 0 14px;
    font-weight: 600;
}
.tbp-slots-list {
    display: flex;
    flex-direction: column;
    gap: 10px;
}
.tbp-slot-card {
    border: 2px solid #e5e7eb;
    border-radius: var(--tbp-radius);
    padding: 14px 16px;
    cursor: pointer;
    transition: border-color .2s, box-shadow .2s;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
}
.tbp-slot-card:hover,
.tbp-slot-card.tbp-selected {
    border-color: var(--tbp-primary);
    box-shadow: 0 0 0 3px rgba(37,99,235,.15);
}
.tbp-slot-info { flex: 1; }
.tbp-slot-name {
    font-weight: 700;
    font-size: 1em;
}
.tbp-slot-time {
    font-size: .85em;
    color: #6b7280;
    margin-top: 2px;
}
.tbp-slot-spots {
    font-size: .78em;
    color: #6b7280;
}
.tbp-slot-price {
    font-weight: 700;
    font-size: 1.1em;
    color: var(--tbp-primary);
    white-space: nowrap;
}
.tbp-slot-color-bar {
    width: 4px;
    border-radius: 4px;
    align-self: stretch;
    flex-shrink: 0;
}
.tbp-no-slots {
    color: #6b7280;
    font-style: italic;
}

/* Form */
.tbp-selected-summary {
    background: rgba(37,99,235,.06);
    border-radius: 6px;
    padding: 10px 14px;
    margin-bottom: 20px;
    font-size: .9em;
}
.tbp-form-fields {
    display: flex;
    flex-direction: column;
    gap: 14px;
}
.tbp-field {
    display: flex;
    flex-direction: column;
    gap: 4px;
}
.tbp-field label {
    font-size: .85em;
    font-weight: 600;
    color: #374151;
}
.tbp-required { color: #ef4444; }
.tbp-input {
    border: 1px solid #d1d5db;
    border-radius: 6px;
    padding: 9px 12px;
    font-size: 1em;
    font-family: inherit;
    color: var(--tbp-text);
    background: #fff;
    transition: border-color .2s, box-shadow .2s;
    width: 100%;
    box-sizing: border-box;
}
.tbp-input:focus {
    outline: none;
    border-color: var(--tbp-primary);
    box-shadow: 0 0 0 3px rgba(37,99,235,.15);
}
textarea.tbp-input { resize: vertical; }

/* Price display */
.tbp-price-display {
    margin-top: 18px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 12px 16px;
    background: #f9fafb;
    border-radius: 6px;
    border: 1px solid #e5e7eb;
}
.tbp-price-label { font-weight: 600; }
.tbp-price-value {
    font-size: 1.3em;
    font-weight: 700;
    color: var(--tbp-primary);
}

/* Button */
.tbp-btn {
    display: block;
    width: 100%;
    margin-top: 18px;
    padding: 12px;
    background: var(--tbp-primary);
    color: #fff;
    border: none;
    border-radius: var(--tbp-radius);
    font-size: 1em;
    font-weight: 600;
    cursor: pointer;
    transition: background .2s, transform .1s;
}
.tbp-btn:hover { background: var(--tbp-secondary); }
.tbp-btn:active { transform: scale(.98); }

/* Payment */
.tbp-payment-summary {
    background: rgba(37,99,235,.06);
    border-radius: 6px;
    padding: 12px 16px;
    margin-bottom: 18px;
    font-size: .9em;
}

/* Confirmation */
.tbp-step-confirm { text-align: center; padding: 20px 0; }
.tbp-confirm-icon {
    width: 60px;
    height: 60px;
    border-radius: 50%;
    background: #22c55e;
    color: #fff;
    font-size: 2em;
    line-height: 60px;
    margin: 0 auto 16px;
}
.tbp-confirm-details {
    text-align: left;
    background: #f9fafb;
    border-radius: 6px;
    padding: 14px 16px;
    margin: 16px 0;
    font-size: .9em;
}
.tbp-confirm-details p { margin: 4px 0; }

/* Error */
.tbp-error {
    color: #dc2626;
    font-size: .85em;
    margin-top: 8px;
    display: none;
}
.tbp-error.tbp-visible { display: block; }

/* Loading overlay */
.tbp-loading {
    display: none;
    position: absolute;
    inset: 0;
    background: rgba(255,255,255,.75);
    border-radius: var(--tbp-radius);
    align-items: center;
    justify-content: center;
    z-index: 10;
}
.tbp-loading.tbp-visible { display: flex; }
.tbp-spinner {
    width: 36px;
    height: 36px;
    border: 3px solid rgba(37,99,235,.2);
    border-top-color: var(--tbp-primary);
    border-radius: 50%;
    animation: tbpSpin .7s linear infinite;
}
@keyframes tbpSpin { to { transform: rotate(360deg); } }

/* PayPal button container */
#tbp-paypal-button-container { margin-top: 10px; }
[id$="-paypal-btn"] { margin-top: 10px; }

/* Responsive */
@media (max-width: 480px) {
    .tbp-booking-wrap { padding: 16px; }
    .tbp-slot-card { flex-direction: column; align-items: flex-start; }
    .tbp-slot-color-bar { width: 100%; height: 4px; }
}
