/* TA Booking System — Session Creator
   NOTE: the wux theme uses a 10px root font-size (html{font-size:62.5%}),
   so we use explicit px font sizes here to stay readable regardless of root. */

/* ── Trigger button area ─────────────────────────────── */
.ta-custom-session-wrapper {
    margin-top: 1.75rem;
    padding-top: 1.5rem;
    border-top: 1px solid #e0e0e0;
}

.ta-custom-session-cta {
    display: flex;
    flex-direction: column;
    gap: 0.75rem;
}

.ta-custom-session-intro {
    margin: 0;
    font-size: 15px;
    color: #555;
    line-height: 1.55;
}

.ta-open-session-modal {
    align-self: flex-start;
}

/* ── Modal overlay ───────────────────────────────────── */
.ta-modal {
    position: fixed;
    inset: 0;
    z-index: 99999;
    display: flex;
    align-items: center;
    justify-content: center;
}

.ta-modal[hidden] {
    display: none;
}

.ta-modal__backdrop {
    position: fixed;
    inset: 0;
    background: rgba(15, 23, 42, 0.6);
    cursor: pointer;
    backdrop-filter: blur(2px);
}

.ta-modal__dialog {
    position: relative;
    background: #fff;
    border-radius: 14px;
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.28);
    width: 100%;
    max-width: 480px;
    max-height: 90vh;
    overflow-y: auto;
    padding: 2.25rem 2.25rem 2rem;
    margin: 1rem;
    box-sizing: border-box;
}

/* ── Close button ────────────────────────────────────── */
.ta-modal__close {
    position: absolute;
    top: 1rem;
    right: 1rem;
    width: 38px;
    height: 38px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: #f4f4f5;
    border: none;
    font-size: 22px;
    line-height: 1;
    cursor: pointer;
    color: #555;
    border-radius: 50%;
    transition: background 0.2s, color 0.2s;
}

.ta-modal__close:hover {
    background: #e4e4e7;
    color: #111;
}

/* ── Header ──────────────────────────────────────────── */
.ta-modal__header {
    margin-bottom: 1.5rem;
    padding-right: 2.5rem;
}

.ta-modal__header h2 {
    margin: 0 0 0.35rem;
    font-size: 24px;
    line-height: 1.25;
    font-weight: 700;
    color: #111827;
}

.ta-modal__subtitle {
    margin: 0;
    color: #6b7280;
    font-size: 15px;
    line-height: 1.5;
}

/* ── Form rows ───────────────────────────────────────── */
.ta-form-row {
    display: flex;
    flex-direction: column;
    gap: 0.45rem;
    margin-bottom: 1.4rem;
}

.ta-form-row label {
    font-weight: 600;
    font-size: 16px;
    color: #1f2937;
    line-height: 1.3;
}

.ta-form-row label .required {
    color: #dc2626;
    margin-left: 2px;
}

.ta-input {
    width: 100%;
    padding: 13px 15px;
    border: 1px solid #cbd5e1;
    border-radius: 9px;
    font-size: 17px;
    line-height: 1.2;
    box-sizing: border-box;
    transition: border-color 0.2s, box-shadow 0.2s;
    background: #fff;
    color: #111827;
    -webkit-appearance: none;
    appearance: none;
}

.ta-input:focus {
    outline: none;
    border-color: #2563eb;
    box-shadow: 0 0 0 3px rgba(37, 99, 235, 0.18);
}

.ta-input.ta-input--error {
    border-color: #dc2626;
    box-shadow: 0 0 0 3px rgba(220, 38, 38, 0.12);
}

/* native date/time pickers — keep the icon visible and aligned */
.ta-input[type="date"],
.ta-input[type="time"] {
    min-height: 50px;
}

.ta-field-note {
    font-size: 13.5px;
    color: #6b7280;
    line-height: 1.4;
}

/* ── Notice ──────────────────────────────────────────── */
.ta-modal__notice {
    padding: 12px 15px;
    border-radius: 9px;
    font-size: 15px;
    line-height: 1.45;
    margin-top: 0.75rem;
}

.ta-modal__notice.is-error {
    background: #fef2f2;
    border: 1px solid #fca5a5;
    color: #b91c1c;
}

.ta-modal__notice.is-success {
    background: #f0fdf4;
    border: 1px solid #86efac;
    color: #15803d;
}

.ta-modal__notice.is-info {
    background: #eff6ff;
    border: 1px solid #93c5fd;
    color: #1d4ed8;
}

/* ── Footer ──────────────────────────────────────────── */
.ta-modal__footer {
    display: flex;
    gap: 0.85rem;
    justify-content: flex-end;
    margin-top: 1.75rem;
    padding-top: 1.4rem;
    border-top: 1px solid #eef0f2;
}

.ta-modal__footer .btn {
    font-size: 16px;
}

/* ── Loading state ───────────────────────────────────── */
#ta-session-submit.is-loading {
    opacity: 0.7;
    pointer-events: none;
    cursor: default;
}

/* ── Course-page booking widget polish ───────────────── */
.ta-course-booking-wrap {
    margin-top: 0.5rem;
}

.ta-course-booking .wc-bookings-booking-form,
.ta-course-booking .wc-bookings-date-picker {
    margin-bottom: 0.75rem;
}

.ta-course-signup {
    width: 100%;
    text-align: center;
    justify-content: center;
}

/* ── Responsive ──────────────────────────────────────── */
@media (max-width: 520px) {
    .ta-modal__dialog {
        padding: 1.75rem 1.25rem 1.5rem;
        border-radius: 12px;
    }

    .ta-modal__header h2 {
        font-size: 21px;
    }

    .ta-modal__footer {
        flex-direction: column-reverse;
    }

    .ta-modal__footer .btn {
        width: 100%;
        text-align: center;
    }
}
