/* Bold Access Events – Blue Card theme */

/* =========================================================================
   Events table
   ========================================================================= */

.bae-events-wrap {
    background: #fff;
    border-radius: 10px;
    box-shadow: 0 1px 6px rgba(30,58,95,.09);
    overflow: hidden;
    margin-bottom: 2em;
}

.bae-events-inner {
    padding: 16px 18px;
    overflow-x: auto;
}

/* Scoped DataTables overrides */
.bae-events-inner .dataTables_wrapper {
    font-size: 14px;
}
.bae-events-inner .dataTables_filter {
    margin-bottom: 12px;
}
.bae-events-inner .dataTables_filter label {
    font-weight: 500;
    color: #475569;
}
.bae-events-inner .dataTables_filter input {
    border: 1.5px solid #cbd5e1;
    border-radius: 6px;
    padding: 6px 12px;
    font-size: 13px;
    width: 220px;
    transition: border-color .15s, box-shadow .15s;
    margin-left: 6px;
}
.bae-events-inner .dataTables_filter input:focus {
    outline: none;
    border-color: #2563eb;
    box-shadow: 0 0 0 3px rgba(37,99,235,.14);
}
.bae-events-inner .dataTables_length select {
    border: 1.5px solid #cbd5e1;
    border-radius: 5px;
    padding: 4px 6px;
    margin: 0 4px;
}
.bae-events-inner .dataTables_info {
    font-size: 12px;
    color: #94a3b8;
}
.bae-events-inner .dataTables_paginate .paginate_button {
    border-radius: 5px !important;
    padding: 3px 9px !important;
    font-size: 13px !important;
}
.bae-events-inner .dataTables_paginate .paginate_button.current,
.bae-events-inner .dataTables_paginate .paginate_button.current:hover {
    background: #2563eb !important;
    border-color: #1d4ed8 !important;
    color: #fff !important;
}
.bae-events-inner .dataTables_paginate .paginate_button:hover:not(.current) {
    background: #eff6ff !important;
    border-color: #bfdbfe !important;
    color: #1e3a5f !important;
}

table.bae-events-table {
    width: 100%;
    border-collapse: collapse;
    font-size: 13px;
}
table.bae-events-table thead th {
    background: #1e3a5f;
    color: #bfdbfe;
    padding: 10px 12px;
    text-align: left;
    font-size: 11px;
    font-weight: 600;
    letter-spacing: 0.07em;
    text-transform: uppercase;
    border: none;
    white-space: nowrap;
}
table.bae-events-table thead th.sorting_asc::after,
table.bae-events-table thead th.sorting_desc::after {
    color: #60a5fa;
}
table.bae-events-table thead th.sorting::after {
    color: #4e6d8c;
}
table.bae-events-table tbody td {
    padding: 9px 12px;
    border-bottom: 1px solid #f1f5f9;
    vertical-align: middle;
    color: #334155;
}
table.bae-events-table tbody tr:last-child td {
    border-bottom: none;
}
table.bae-events-table tbody tr:hover td {
    background: #eff6ff;
}
table.bae-events-table tbody tr.bae-row-warn td {
    color: #92400e;
    background: #fffbeb;
}

.bae-tag-success {
    display: inline-block;
    background: #dbeafe;
    color: #1d4ed8;
    border-radius: 4px;
    padding: 1px 7px;
    font-size: 11px;
    font-weight: 600;
}

/* DataTables responsive child row control */
table.bae-events-table.dtr-inline.collapsed > tbody > tr > td.dtr-control::before {
    background-color: #2563eb !important;
    border-color: #1d4ed8 !important;
}

/* =========================================================================
   Sessions – toolbar
   ========================================================================= */

.bae-sessions-toolbar {
    display: flex;
    align-items: center;
    gap: 10px;
    margin-bottom: 16px;
    flex-wrap: wrap;
}

.bae-search-box {
    position: relative;
    flex: 1;
    min-width: 220px;
    max-width: 360px;
}
.bae-search-box svg {
    position: absolute;
    left: 11px;
    top: 50%;
    transform: translateY(-50%);
    pointer-events: none;
    color: #94a3b8;
}
.bae-search-box input[type="search"] {
    width: 100%;
    border: 1.5px solid #cbd5e1;
    border-radius: 8px;
    padding: 8px 12px 8px 36px;
    font-size: 14px;
    background: #fff;
    transition: border-color .15s, box-shadow .15s;
    -webkit-appearance: none;
}
.bae-search-box input[type="search"]:focus {
    outline: none;
    border-color: #2563eb;
    box-shadow: 0 0 0 3px rgba(37,99,235,.14);
}

.bae-hint-chips {
    display: flex;
    align-items: center;
    gap: 5px;
    flex-wrap: wrap;
}
.bae-hint-chip {
    background: #eff6ff;
    color: #2563eb;
    border: 1px solid #bfdbfe;
    border-radius: 4px;
    padding: 2px 9px;
    font-size: 12px;
    font-weight: 500;
    cursor: pointer;
    transition: background .1s, border-color .1s;
    user-select: none;
}
.bae-hint-chip:hover {
    background: #dbeafe;
    border-color: #93c5fd;
}

.bae-session-count {
    font-size: 13px;
    color: #64748b;
    margin-left: auto;
    white-space: nowrap;
}

/* =========================================================================
   Sessions – card grid
   ========================================================================= */

.bae-sessions-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(290px, 1fr));
    gap: 14px;
}

.bae-session-card {
    background: #fff;
    border-radius: 10px;
    border: 1.5px solid #e2e8f0;
    box-shadow: 0 1px 4px rgba(30,58,95,.06);
    overflow: hidden;
    transition: box-shadow .15s, border-color .15s;
}
.bae-session-card:hover {
    box-shadow: 0 6px 20px rgba(37,99,235,.12);
    border-color: #2563eb;
}
.bae-session-card.bae-hidden {
    display: none;
}

.bae-card-head {
    background: #1e3a5f;
    color: #fff;
    padding: 12px 16px;
    display: flex;
    justify-content: space-between;
    align-items: center;
}
.bae-card-date {
    font-weight: 700;
    font-size: 15px;
}
.bae-card-duration {
    background: #2563eb;
    color: #fff;
    border-radius: 5px;
    padding: 2px 10px;
    font-size: 13px;
    font-weight: 700;
}

.bae-card-times {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 10px 16px 8px;
    background: #eff6ff;
    border-bottom: 1px solid #dbeafe;
    font-size: 14px;
}
.bae-card-time {
    font-variant-numeric: tabular-nums;
    font-weight: 600;
    color: #1e3a5f;
}
.bae-card-arrow {
    color: #93c5fd;
    font-size: 16px;
}
.bae-card-event-count {
    margin-left: auto;
    font-size: 12px;
    color: #64748b;
    background: #dbeafe;
    border-radius: 20px;
    padding: 2px 10px;
    font-weight: 500;
    white-space: nowrap;
}

.bae-card-devices {
    padding: 10px 16px 14px;
}
.bae-card-devices-label {
    font-size: 10px;
    font-weight: 700;
    letter-spacing: 0.08em;
    text-transform: uppercase;
    color: #94a3b8;
    margin-bottom: 7px;
}
.bae-card-devices ul {
    list-style: none;
    margin: 0;
    padding: 0;
    display: flex;
    flex-direction: column;
    gap: 4px;
}
.bae-card-devices ul li {
    font-size: 13px;
    color: #475569;
    display: flex;
    align-items: center;
    gap: 8px;
}
.bae-card-devices ul li::before {
    content: '';
    width: 5px;
    height: 5px;
    border-radius: 50%;
    background: #2563eb;
    flex-shrink: 0;
}

.bae-no-results {
    display: none;
    grid-column: 1 / -1;
    text-align: center;
    padding: 40px 20px;
    color: #94a3b8;
    font-size: 14px;
}
.bae-no-results.bae-visible {
    display: block;
}

/* =========================================================================
   Shared error state
   ========================================================================= */

.bae-error {
    color: #92400e;
    background: #fffbeb;
    border-left: 4px solid #d97706;
    padding: 0.75em 1em;
    margin: 1em 0;
}

/* =========================================================================
   Responsive
   ========================================================================= */

@media (max-width: 640px) {
    .bae-sessions-grid {
        grid-template-columns: 1fr;
    }
    .bae-search-box {
        max-width: 100%;
        min-width: 0;
        flex: 1 1 100%;
    }
    .bae-sessions-toolbar {
        gap: 8px;
    }
    .bae-session-count {
        margin-left: 0;
    }
    .bae-events-inner .dataTables_filter input {
        width: 100%;
    }
    .bae-events-inner {
        padding: 12px 10px;
    }
}
