/* =============================================================
   Exam Session Manager – Frontend Styles
   ============================================================= */

/* --- Booking Widget ----------------------------------------- */

.esm-booking-widget { font-family: inherit; }
.esm-row            { display: flex; gap: 2rem; flex-wrap: wrap; }
.esm-col-left       { flex: 0 0 180px; }
.esm-col-right      { flex: 1; min-width: 280px; }
.esm-section        { margin-bottom: 1.5rem; }

.esm-section-label  { color: #c0392b; font-weight: 600; margin-bottom: .5rem; }

.esm-cat-btn,
.esm-variant-btn {
    display: block;
    width: 100%;
    margin-bottom: .4rem;
    padding: .5rem 1rem;
    border: none;
    cursor: pointer;
    background: #eee;
    text-align: left;
    border-radius: 3px;
}

.esm-cat-btn.active,
.esm-variant-btn.active { background: #c0392b; color: #fff; }

.esm-date-btn {
    display: flex;
    flex-direction: column;
    width: 100%;
    margin-bottom: .4rem;
    padding: .5rem 1rem;
    border: none;
    cursor: pointer;
    background: #eee;
    text-align: left;
    border-radius: 3px;
}

.esm-date-btn.active          { background: #c0392b; color: #fff; }
.esm-date-btn.active .esm-date-btn-stock { color: rgba(255,255,255,.8); }

.esm-date-btn-date  { font-weight: 600; }
.esm-date-btn-stock { font-size: var(--text-s); color: #666; margin-top: .15rem; }

.esm-date-btn.esm-btn-soldout { opacity: .5; cursor: not-allowed; }
.esm-sold-out                 { color: #c0392b; }

.esm-ticket-title {
    font-size: var(--text-l);
    margin-bottom: 1rem;
    border-bottom: 1px solid #ddd;
    padding-bottom: .5rem;
}

.esm-ticket-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 1rem;
    margin-bottom: 1rem;
}

.esm-ticket-meta-label { color: #c0392b; font-size: var(--text-s); }
.esm-ticket-meta-value { font-weight: 700; color: #c0392b; }

.esm-ticket-footer {
    display: flex;
    align-items: center;
    justify-content: flex-end;
    gap: 1rem;
    margin-bottom: .5rem;
}

.esm-book-btn {
    background: #c0392b;
    color: #fff;
    border: none;
    padding: .6rem 1.5rem;
    cursor: pointer;
    font-weight: 700;
    border-radius: 3px;
}

.esm-ticket-note { font-size: var(--text-s); color: #666; }

/* --- Cart / Attendee Forms ----------------------------------- */

.esm-fill-hint {
    background: #fff3cd;
    border: 1px solid #ffc107;
    color: #856404;
    padding: .75rem 1rem;
    border-radius: 4px;
    margin-bottom: 1rem;
}
.esm-fill-hint.hidden { display: none; }

.esm-attendee-wrap {
    margin-top: 1rem;
    border: 1px solid #ddd;
    border-radius: 4px;
    margin-bottom: 1.5rem;
}

.esm-attendee-header {
    padding: .6rem 1rem;
    background: #f5f5f5;
    display: flex;
    align-items: center;
    gap: .75rem;
    border-radius: 4px 4px 0 0;
    cursor: pointer;
}

.esm-attendee-title  { font-weight: 600; }

.esm-attendee-status {
    font-size: inherit;
    color: #c0392b;
    margin-left: auto;
}
.esm-attendee-status.complete { color: green; }

.esm-collapse-icon {
    margin-left: .5rem;
    margin-right: 1rem;
}

.esm-icon {
    width: 20px;
    height: 20px;
    vertical-align: middle;
    display: inline-block;
}

.esm-attendee-body { padding: 1rem; }

.esm-radio-group {
    display: flex;
    flex-direction: row;
    flex-wrap: wrap;
    gap: .3rem 1.5rem;
    margin-top: .3rem;
}

.esm-radio-label {
    display: flex;
    align-items: center;
    gap: .4rem;
    font-weight: normal;
    cursor: pointer;
}

.esm-dob-group  { display: flex; gap: .5rem; margin-top: 10px; align-items: center; }
.esm-dob-select { flex: 1; height: 40px !important; margin-block-start: 0 !important; margin-top: 10px; }
.esm-select     { width: 100%; margin-top: .3rem; padding: .5rem; }
select[name*="_birth_country"], select[name*="_nationality"] { max-width: 40ch; }

.esm-consent { margin-top: .5rem; }

.esm-checkbox-label {
    display: flex;
    align-items: flex-start;
    gap: .5rem;
    font-weight: normal;
    cursor: pointer;
    line-height: 1.4;
}
.esm-checkbox-label input { margin-top: .2rem; flex-shrink: 0; }

.esm-copy-btn {
    background: transparent;
    border: 2px solid #c0392b;
    color: #c0392b;
    padding: .5rem 1.25rem;
    cursor: pointer;
    border-radius: 3px;
    margin-bottom: 1rem;
    font-size: inherit;
    font-weight: 600;
    display: inline-block;
    transition: background .15s, color .15s;
}
.esm-copy-btn:hover {
    background: #c0392b;
    color: #fff;
}

.esm-save-row {
    display: flex !important;
    align-items: center;
    gap: 1rem;
    flex-wrap: wrap;
}
.esm-save-attendee { flex-shrink: 0; }
.esm-save-feedback {
    font-weight: 600;
    font-size: inherit;
}
.esm-qty-fixed      { color: #666; }

/* Original WC-Button verstecken – wird durch #esm-proceed-wrap ersetzt */
.wc-proceed-to-checkout { display: none !important; }

#esm-proceed-wrap { margin-top: 1rem; }

#esm-proceed-btn.esm-disabled,
#esm-proceed-btn[aria-disabled="true"] {
    opacity: .5 !important;
    cursor: not-allowed !important;
    pointer-events: none !important;
}

/* --- Checkout Summary --------------------------------------- */

#esm-checkout-summary            { margin-bottom: 1.5rem; }
#esm-checkout-summary h3         { margin-bottom: .75rem; }

.esm-summary-item {
    border: 1px solid #ddd;
    border-radius: 4px;
    margin-bottom: .75rem;
}

.esm-summary-header {
    padding: .75rem 1rem;
    cursor: pointer;
    display: flex;
    align-items: center;
    gap: .5rem;
    background: #f9f9f9;
    user-select: none;
}

.esm-summary-body { padding: 1rem; }

.esm-summary-dl {
    display: grid;
    grid-template-columns: auto 1fr;
    gap: .2rem .75rem;
}
.esm-summary-dl dt { font-weight: 600; }
.esm-summary-dl dd { margin: 0; }

.esm-sum-complete   { color: green; font-size: .85rem; }
.esm-sum-incomplete { color: #c0392b; font-size: .85rem; }
.esm-toggle-icon    { margin-left: auto; }

/* --- Upcoming Sessions Table -------------------------------- */

.esm-upcoming-table             { border-collapse: collapse; width: 100%; }
.esm-upcoming-table tr          { border-bottom: 1px solid #eee; }
.esm-upcoming-table td          { padding: .5rem .75rem; vertical-align: middle; }
.esm-upcoming-date              { white-space: nowrap; font-weight: 600; width: 8rem; }
.esm-upcoming-name a            { color: inherit; text-decoration: none; }
.esm-upcoming-name a:hover      { color: #c0392b; }
