/**
 * YSP TP Workshops — Front-end CSS
 *
 * Styles for the booking calendar, booking modal, and my bookings panel
 * as rendered inside class-ysp-talking-points-browser.php
 *
 * AUTHOR & COPYRIGHT: JONATHAN BOYDELL / YOUSPEAKPLUS
 */

/* ── Workshop section wrapper ────────────────────────────────────────────── */
.ysp-tp-workshop-section {
    max-width: 1100px;
    margin: 48px auto 40px;
    padding: 0 20px;
}

/* ── Section header ──────────────────────────────────────────────────────── */
.ysp-tp-ws-header {
    text-align: center;
    margin-bottom: 28px;
}
.ysp-tp-ws-header h2 {
    font-size: 26px;
    font-weight: 600;
    color: #0a9396;
    margin: 0 0 10px;
}
.ysp-tp-ws-intro {
    font-size: 16px;
    color: #555;
    max-width: 680px;
    margin: 0 auto 16px;
    line-height: 1.6;
}
.ysp-tp-ws-login-notice {
    background: #e8f8f8;
    border: 1px solid #9fe1cb;
    border-radius: 6px;
    padding: 14px 20px;
    max-width: 520px;
    margin: 0 auto;
    font-size: 15px;
    color: #0f6e56;
}
.ysp-tp-ws-login-notice a {
    color: #0a9396;
    font-weight: 600;
}

/* ── CEFR filter tabs ────────────────────────────────────────────────────── */
.ysp-tp-ws-level-tabs {
    display: flex;
    justify-content: center;
    gap: 8px;
    margin-top: 18px;
    flex-wrap: wrap;
}
.ysp-tp-level-tab {
    padding: 7px 20px;
    border: 2px solid #ddd;
    background: #fff;
    border-radius: 24px;
    font-size: 14px;
    font-weight: 500;
    cursor: pointer;
    transition: all .15s ease;
    color: #555;
}
.ysp-tp-level-tab:hover {
    border-color: #0a9396;
    color: #0a9396;
}
.ysp-tp-level-tab.active {
    background: #0a9396;
    border-color: #0a9396;
    color: #fff;
}

/* ── FullCalendar front-end overrides ────────────────────────────────────── */
#ysp-tp-front-calendar {
    margin-bottom: 40px;
    background: #fff;
    border-radius: 8px;
    box-shadow: 0 2px 12px rgba(0,0,0,.08);
    padding: 16px;
}

.ysp-tp-fc-front-event {
    padding: 6px 10px;
    font-size: 13px;
    line-height: 1.5;
    cursor: pointer;
    background: #fff;
    border-radius: 4px;
    display: flex;
    align-items: center;
    gap: 8px;
    flex-wrap: wrap;
}
.ysp-tp-fc-cefr {
    font-weight: 700;
    font-size: 13px;
}
.ysp-tp-fc-teacher {
    color: #333;
}
.ysp-tp-fc-seats {
    font-size: 12px;
    color: #0a9396;
    background: #e1f5ee;
    padding: 1px 7px;
    border-radius: 10px;
}
.ysp-tp-fc-full {
    font-size: 12px;
    color: #b32d2e;
    background: #fce8e8;
    padding: 1px 7px;
    border-radius: 10px;
    font-weight: 600;
}
.ysp-tp-fc-booked-tag {
    font-size: 12px;
    color: #0a9396;
    font-weight: 600;
}

/* ── Badges ──────────────────────────────────────────────────────────────── */
.ysp-tp-ws-badge {
    display: inline-block;
    padding: 2px 9px;
    border-radius: 3px;
    font-size: 12px;
    font-weight: 700;
    color: #fff;
    text-transform: uppercase;
    letter-spacing: .04em;
    vertical-align: middle;
}

/* ── Buttons ─────────────────────────────────────────────────────────────── */
.ysp-tp-btn {
    display: inline-block;
    padding: 10px 22px;
    border-radius: 6px;
    font-size: 15px;
    font-weight: 600;
    cursor: pointer;
    border: 2px solid transparent;
    text-align: center;
    text-decoration: none;
    transition: background .15s, color .15s, border-color .15s;
    line-height: 1.4;
}
.ysp-tp-btn-primary {
    background: #0a9396;
    border-color: #0a9396;
    color: #fff;
}
.ysp-tp-btn-primary:hover {
    background: #086a6e;
    border-color: #086a6e;
}
.ysp-tp-btn-primary:disabled {
    opacity: .6;
    cursor: not-allowed;
}
.ysp-tp-btn-secondary {
    background: #fff;
    border-color: #0a9396;
    color: #0a9396;
}
.ysp-tp-btn-secondary:hover {
    background: #e1f5ee;
}
.ysp-tp-btn-danger {
    background: #b32d2e;
    border-color: #b32d2e;
    color: #fff;
}
.ysp-tp-btn-danger:hover {
    background: #8e2324;
}
.ysp-tp-btn-ghost {
    background: transparent;
    border-color: #ccc;
    color: #555;
    font-size: 13px;
    padding: 7px 14px;
}
.ysp-tp-btn-ghost:hover {
    border-color: #888;
    color: #222;
}

/* ── Booking Modal ───────────────────────────────────────────────────────── */
#ysp-tp-booking-modal-overlay {
    position: fixed;
    inset: 0;
    background: rgba(0,0,0,.55);
    z-index: 99999;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 20px;
}
#ysp-tp-booking-modal {
    background: #fff;
    border-radius: 10px;
    width: 520px;
    max-width: 100%;
    max-height: 90vh;
    overflow-y: auto;
    box-shadow: 0 8px 40px rgba(0,0,0,.25);
    display: flex;
    flex-direction: column;
}
.ysp-tp-modal-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 18px 22px 14px;
    border-bottom: 1px solid #eee;
    flex-shrink: 0;
}
.ysp-tp-modal-header h3 {
    margin: 0;
    font-size: 18px;
    font-weight: 600;
    color: #0a9396;
}
.ysp-tp-modal-close {
    background: none;
    border: none;
    font-size: 26px;
    cursor: pointer;
    color: #888;
    line-height: 1;
    padding: 0;
}
.ysp-tp-modal-close:hover {
    color: #333;
}
.ysp-tp-modal-body {
    padding: 20px 22px;
    flex: 1;
}
.ysp-tp-modal-footer {
    padding: 14px 22px;
    border-top: 1px solid #eee;
    text-align: right;
    flex-shrink: 0;
}

/* Session info rows */
.ysp-tp-modal-session-info {
    margin-bottom: 16px;
}
.ysp-tp-modal-detail-row {
    display: flex;
    justify-content: space-between;
    align-items: baseline;
    padding: 6px 0;
    border-bottom: 1px solid #f3f3f3;
    font-size: 14px;
}
.ysp-tp-modal-detail-row:last-child {
    border-bottom: none;
}
.ysp-tp-modal-detail-label {
    color: #888;
    font-weight: 500;
    flex-shrink: 0;
    margin-right: 12px;
}
.ysp-tp-modal-detail-value {
    color: #222;
    text-align: right;
}
.ysp-tp-price-tag {
    font-size: 18px;
    font-weight: 700;
    color: #0a9396;
}

/* Seats */
.ysp-tp-modal-seats {
    font-size: 15px;
    margin-bottom: 16px;
    font-weight: 500;
}
.ysp-tp-seats-avail {
    color: #0a9396;
}
.ysp-tp-seats-full {
    color: #b32d2e;
}

/* State messages */
.ysp-tp-already-booked,
.ysp-tp-success-msg {
    color: #0f6e56;
    background: #e1f5ee;
    border-radius: 6px;
    padding: 10px 14px;
    font-size: 14px;
    font-weight: 500;
}
.ysp-tp-full-msg,
.ysp-tp-error-msg {
    color: #b32d2e;
    background: #fce8e8;
    border-radius: 6px;
    padding: 10px 14px;
    font-size: 14px;
}

/* Modal action buttons */
.ysp-tp-modal-actions {
    display: flex;
    gap: 10px;
    flex-wrap: wrap;
    margin-top: 6px;
}

/* Swap panel */
#ysp-tp-swap-panel {
    margin-top: 16px;
    padding-top: 14px;
    border-top: 1px solid #eee;
}
#ysp-tp-swap-panel h4 {
    font-size: 14px;
    font-weight: 600;
    color: #555;
    margin: 0 0 10px;
}
.ysp-tp-swap-option {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 10px 0;
    border-bottom: 1px solid #f3f3f3;
    gap: 12px;
    flex-wrap: wrap;
}
.ysp-tp-swap-option:last-child {
    border-bottom: none;
}
.ysp-tp-swap-info {
    font-size: 14px;
    color: #333;
}
.ysp-tp-no-swap {
    color: #888;
    font-size: 14px;
    padding: 8px 0;
}

/* Spinner */
.ysp-tp-spinner {
    display: inline-block;
    width: 14px;
    height: 14px;
    border: 2px solid #ccc;
    border-top-color: #0a9396;
    border-radius: 50%;
    animation: yspTpSpin .7s linear infinite;
    vertical-align: middle;
    margin-right: 6px;
}
@keyframes yspTpSpin {
    to { transform: rotate(360deg); }
}

/* Loading / empty state */
.ysp-tp-loading {
    color: #888;
    font-style: italic;
    font-size: 14px;
}

/* ── My Bookings section ─────────────────────────────────────────────────── */
.ysp-tp-my-bookings {
    margin-top: 16px;
    padding-top: 28px;
    border-top: 2px solid #e1f5ee;
}
.ysp-tp-my-bookings h3 {
    font-size: 20px;
    font-weight: 600;
    color: #0a9396;
    margin: 0 0 16px;
}
.ysp-tp-booking-card {
    background: #fff;
    border: 1px solid #d4edda;
    border-left: 4px solid #0a9396;
    border-radius: 8px;
    padding: 16px 20px;
    margin-bottom: 14px;
    box-shadow: 0 1px 6px rgba(0,0,0,.06);
}
.ysp-tp-booking-card-header {
    display: flex;
    align-items: center;
    gap: 10px;
    margin-bottom: 10px;
    font-size: 15px;
}
.ysp-tp-booking-card-body {
    font-size: 14px;
    color: #444;
    margin-bottom: 12px;
    line-height: 1.6;
}
.ysp-tp-booking-card-body p {
    margin: 4px 0;
}
.ysp-tp-booking-card-actions {
    display: flex;
    gap: 10px;
    flex-wrap: wrap;
    align-items: center;
}
.ysp-tp-no-cancel-note {
    font-size: 12px;
    color: #888;
    font-style: italic;
}
.ysp-tp-zoom-btn {
    font-size: 14px;
    padding: 8px 18px;
}
.ysp-tp-zoom-pending {
    font-size: 13px;
    color: #888;
    font-style: italic;
}
.ysp-tp-no-bookings {
    color: #888;
    font-size: 15px;
    padding: 10px 0;
}

/* ── Responsive ──────────────────────────────────────────────────────────── */
@media (max-width: 600px) {
    .ysp-tp-workshop-section {
        padding: 0 12px;
    }
    .ysp-tp-ws-header h2 {
        font-size: 20px;
    }
    #ysp-tp-front-calendar {
        padding: 8px;
    }
    .ysp-tp-booking-card-actions {
        flex-direction: column;
        align-items: flex-start;
    }
    .ysp-tp-modal-detail-row {
        flex-direction: column;
        gap: 2px;
    }
    .ysp-tp-modal-detail-value {
        text-align: left;
    }
}