/*
 * Booking App Plugin – Component CSS
 *
 * This file contains ONLY styles that are specific to the plugin's
 * timetable widget and are not already declared in the theme's style.css.
 *
 * Header, footer, buttons, modals, forms and the booking table
 * are all handled by the theme's style.css.
 *
 * Version: 2.1
 */

/*
 * NOTE: The CSS custom properties (--ba-primary, --ba-accent, etc.) are
 * defined in style.css. If this plugin is ever used without the
 * booking-app-theme, add :root { ... } declarations here.
 */

/* ─────────────────────────────────────────────
 * Status Filter Bar
 * ───────────────────────────────────────────── */

.ba-filter-bar {
    display: flex;
    align-items: center;
    gap: 8px;
    flex-wrap: wrap;
    margin: 12px 0 16px;
}

.ba-filter-label {
    font-size: 18px;
    color: #555;
    font-weight: 600;
    margin-right: 4px;
}

.ba-filter-btn {
    padding: 6px 16px;
    border: 1px solid var(--ba-primary, #2563eb);
    border-radius: 20px;
    background: transparent;
    color: var(--ba-primary, #2563eb);
    font-size: 13px;
    cursor: pointer;
    transition: background 0.15s, color 0.15s;
}

.ba-filter-btn:hover {
    background: var(--ba-primary, #2563eb);
    color: #fff;
}

.ba-filter-btn.ba-filter-active {
    background: var(--ba-primary, #2563eb);
    color: #fff;
    font-weight: 600;
}

/* ─────────────────────────────────────────────
 * Cancelled row style (in booking table)
 * ───────────────────────────────────────────── */

.booking-app-table tr.ba-row-cancelled td {
    opacity: 0.6;
    font-style: italic;
}

.ba-cancelled-label {
    font-size: 12px;
    color: #888;
}

/* ─────────────────────────────────────────────
 * CSV Export Box (frontend, admin only)
 * ───────────────────────────────────────────── */

.ba-csv-export-box {
    background: #f8fafc;
    border: 1px solid #e2e8f0;
    border-radius: 8px;
    padding: 16px 20px;
    margin-bottom: 24px;
}

.ba-csv-export-header h3 {
    margin: 0 0 12px;
    font-size: 15px;
    color: #1e293b;
}

.ba-csv-export-controls {
    display: flex;
    align-items: flex-end;
    flex-wrap: wrap;
    gap: 16px;
}

.ba-csv-field {
    display: flex;
    flex-direction: column;
    gap: 4px;
}

.ba-csv-field label {
    font-size: 12px;
    font-weight: 600;
    color: #475569;
    text-transform: uppercase;
    letter-spacing: 0.04em;
}

.ba-csv-field select {
    min-width: 160px;
    padding: 7px 10px;
    border: 1px solid #cbd5e1;
    border-radius: 6px;
    font-size: 14px;
    background: #fff;
}

.ba-csv-btn {
    padding: 8px 18px !important;
    font-size: 14px !important;
    border-radius: 6px !important;
    white-space: nowrap;
}

.ba-csv-msg {
    font-size: 13px;
    color: red;
    align-self: center;
}

/* ═══════════════════════════════════════════════════
   EULA / Nutzungsbedingungen Modal
   ═══════════════════════════════════════════════════ */

/* Full-screen dark overlay – sits on top of everything */
.ba-eula-overlay {
    position: fixed;
    inset: 0;
    z-index: 99999;
    background: rgba(10, 20, 50, 0.72);
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 16px;
    backdrop-filter: blur(3px);
}

/* Modal box */
.ba-eula-box {
    background: #fff;
    border-radius: 10px;
    max-width: 680px;
    width: 100%;
    max-height: 90vh;
    display: flex;
    flex-direction: column;
    box-shadow: 0 8px 40px rgba(0,0,0,0.35);
    border-top: 5px solid #e8a000;
    overflow: hidden;
}

/* Header strip */
.ba-eula-header {
    background: #fff8e6;
    border-bottom: 1px solid #f0d080;
    padding: 18px 24px 14px;
    display: flex;
    align-items: center;
    gap: 12px;
}

.ba-eula-icon {
    font-size: 28px;
    color: #c47d00;
    line-height: 1;
    flex-shrink: 0;
}

.ba-eula-header h2 {
    margin: 0;
    font-size: 17px;
    font-weight: 700;
    color: #1a2f5e;
    line-height: 1.3;
}

/* Scrollable text body */
.ba-eula-body {
    padding: 20px 26px;
    overflow-y: auto;
    flex: 1;
    color: #2c2c2c;
    font-size: 13.5px;
    line-height: 1.65;
}

.ba-eula-body .ba-eula-intro {
    background: #f0f4fb;
    border-left: 4px solid #1a2f5e;
    padding: 10px 14px;
    border-radius: 0 6px 6px 0;
    margin: 0 0 18px;
    color: #1a2f5e;
    font-weight: 500;
}

.ba-eula-body h4 {
    margin: 18px 0 6px;
    font-size: 13.5px;
    font-weight: 700;
    color: #1a2f5e;
    border-bottom: 1px solid #e4e8f0;
    padding-bottom: 4px;
}

.ba-eula-body h4:first-of-type {
    margin-top: 0;
}

.ba-eula-body p {
    margin: 0 0 4px;
}

/* Footer with buttons */
.ba-eula-footer {
    padding: 16px 24px;
    border-top: 1px solid #e4e8f0;
    background: #f8f9fb;
    display: flex;
    justify-content: flex-end;
    gap: 12px;
}

.ba-eula-btn {
    padding: 10px 24px;
    border: none;
    border-radius: 6px;
    font-size: 14px;
    font-weight: 600;
    cursor: pointer;
    transition: background 0.18s, transform 0.1s;
}

.ba-eula-btn:active {
    transform: scale(0.97);
}

.ba-eula-btn-reject {
    background: #fff;
    color: #c0392b;
    border: 2px solid #c0392b;
}

.ba-eula-btn-reject:hover {
    background: #fdf0ef;
}

.ba-eula-btn-accept {
    background: #1a2f5e;
    color: #fff;
    border: 2px solid #1a2f5e;
}

.ba-eula-btn-accept:hover {
    background: #253e7a;
}

@media (max-width: 520px) {
    .ba-eula-footer {
        flex-direction: column-reverse;
    }
    .ba-eula-btn {
        width: 100%;
        text-align: center;
    }
}

/* ═══════════════════════════════════════════════════
   SESSION TIMEOUT PROGRESS BAR
   Displayed in the header next to the Abmelden button
   during the last warning period before auto-logout.
   ═══════════════════════════════════════════════════ */

.ba-session-bar {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 4px 10px;
    background: #fffbeb;
    border: 1px solid #f59e0b;
    border-radius: 6px;
    font-size: 12px;
    white-space: nowrap;
    animation: ba-session-bar-fadein 0.4s ease;
}

@keyframes ba-session-bar-fadein {
    from { opacity: 0; transform: translateY(-4px); }
    to   { opacity: 1; transform: translateY(0); }
}

.ba-session-bar-label {
    color: #78350f;
}

.ba-session-bar-track {
    width: 80px;
    height: 6px;
    background: #fde68a;
    border-radius: 3px;
    overflow: hidden;
    flex-shrink: 0;
}

.ba-session-bar-fill {
    height: 100%;
    width: 100%;
    background: #f59e0b;
    border-radius: 3px;
    transition: width 1s linear, background 0.5s;
}

.ba-session-renew-btn {
    padding: 3px 10px;
    background: #1a2f5e;
    color: #fff;
    border: none;
    border-radius: 4px;
    font-size: 12px;
    font-weight: 600;
    cursor: pointer;
    transition: background 0.15s;
    white-space: nowrap;
}

.ba-session-renew-btn:hover {
    background: #253e7a;
}

.ba-session-renew-btn:disabled {
    opacity: 0.6;
    cursor: not-allowed;
}

@media (max-width: 520px) {
    .ba-session-bar-track {
        width: 50px;
    }
}

/* Session bar when shown as fixed overlay in WP admin */
#wpcontent .ba-session-bar,
body.wp-admin .ba-session-bar {
    box-shadow: 0 2px 12px rgba(0,0,0,0.18);
}
