/* style-40-ispkp.css — FEAT-278-P2 ISPKP Applications page */

/* ── Page wrapper ───────────────────────────────────────── */
.isp-page {
    padding: 24px;
    max-width: 1400px;
    margin: 0 auto;
}

/* ── Filter bar ─────────────────────────────────────────── */
.isp-filter-bar {
    display: flex;
    flex-wrap: wrap;
    gap: 16px;
    margin-bottom: 18px;
    align-items: flex-end;
}

.isp-filter-group {
    display: flex;
    flex-direction: column;
    gap: 4px;
    min-width: 160px;
}

.isp-filter-label {
    font-size: 12px;
    color: #9aa3b5;
    margin-bottom: 2px;
}

body[data-theme="light"] .isp-filter-label { color: #5a6376; }

.isp-filter-input {
    min-width: 160px;
    color: #1a1f2e;
}

.isp-plate-input {
    background: #252b3b;
    border: 1px solid #2d3548;
    border-radius: 4px;
    color: #e8eaf0;
    padding: 6px 10px;
    font-size: 14px;
    min-width: 150px;
    height: 36px;
}

body[data-theme="light"] .isp-plate-input {
    background: #ffffff;
    border-color: #c8cfd8;
    color: #1a1f2e;
}

.isp-plate-input:focus {
    outline: none;
    border-color: #4a90d9;
}

/* ── Toolbar (row count + export buttons) ───────────────── */
.isp-toolbar {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 12px;
    flex-wrap: wrap;
    gap: 8px;
}

.isp-row-banner {
    font-size: 13px;
    color: #9aa3b5;
}

body[data-theme="light"] .isp-row-banner { color: #5a6376; }

/* ── Error alert ────────────────────────────────────────── */
.isp-error-alert {
    background: #3b1a1a;
    border-left: 4px solid #dc3545;
    border-radius: 4px;
    padding: 10px 14px;
    color: #f8d7da;
    font-size: 13px;
    margin-bottom: 12px;
}

body[data-theme="light"] .isp-error-alert {
    background: #fff5f5;
    border-left-color: #dc3545;
    color: #721c24;
}

/* ── Table ──────────────────────────────────────────────── */
/* isp-table inherits tk-table shell; this override allows wrapping in cells */
.isp-table td { white-space: normal; }

.isp-grey { color: #6b7280; }
body[data-theme="light"] .isp-grey { color: #9aa3b5; }

/* ── Type filter: wider for 42-char option values ────────── */
.isp-type-group {
    min-width: 360px;
}

/* Option rows in the open menu — wrap to full text, no clipping */
#isp-type .Select-option {
    white-space: normal;
    word-break: break-word;
    line-height: 1.4;
    padding: 6px 10px;
}

/* Menu min-width matches the widened control */
#isp-type .Select-menu-outer {
    min-width: 100%;
}

/* Selected value wraps rather than truncating */
#isp-type .Select-control { height: auto; min-height: 36px; }
#isp-type .Select-multi-value-wrapper { height: auto; }
#isp-type .Select-value-label {
    white-space: normal;
    word-break: break-word;
}

/* ── 390 px responsive ──────────────────────────────────── */
@media (max-width: 430px) {
    .isp-page {
        padding: 12px;
    }
    .isp-filter-bar {
        flex-direction: column;
    }
    .isp-filter-group,
    .isp-type-group,
    .isp-filter-input,
    .isp-plate-input {
        width: 100%;
        min-width: unset;
    }
}
