/* StatementIQ — custom stylesheet */
/* All colors use Bootstrap CSS variables — no hardcoded hex/rgb */

/* ── Layout ──────────────────────────────────────────────────── */

#app-wrapper {
    min-height: 100vh;
}

#sidebar {
    position: sticky;
    top: 0;
    height: 100vh;
    overflow-y: auto;
}

#sidebar .nav-link {
    font-size: 0.875rem;
}

#sidebar .nav-link.active,
#sidebar .nav-link:hover {
    background-color: rgba(255,255,255,.12);
}

#main-wrapper {
    overflow: hidden;
}

#pjax-container {
    min-height: calc(100vh - 56px);
}

/* ── PJAX progress bar ───────────────────────────────────────── */

#pjax-loader {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    height: 3px;
    z-index: 9999;
}

#pjax-loader::after {
    content: '';
    display: block;
    height: 3px;
    background: var(--bs-primary);
    animation: pjax-bar 1.2s ease-in-out infinite;
}

@keyframes pjax-bar {
    0%   { width: 0; margin-left: 0; }
    50%  { width: 60%; margin-left: 20%; }
    100% { width: 0; margin-left: 100%; }
}

/* ── Transaction row colours ─────────────────────────────────── */

.row-atm {
    background-color: var(--bs-warning-bg-subtle) !important;
}

.row-check {
    background-color: var(--bs-info-bg-subtle) !important;
}

.row-card-funding {
    --bs-card-funding-bg-subtle: #ede9fe;
    background-color: var(--bs-card-funding-bg-subtle) !important;
}

.row-skipped {
    opacity: .5;
    text-decoration: line-through;
}

.row-unmatched td {
    color: var(--bs-danger) !important;
}

.row-selected {
    background-color: var(--bs-primary-bg-subtle) !important;
}

.cell-edited {
    background-color: var(--bs-warning-bg-subtle);
}

/* ── Badges ──────────────────────────────────────────────────── */

.badge-atm {
    background-color: var(--bs-warning);
    color: var(--bs-dark);
}

.badge-check {
    background-color: var(--bs-info);
    color: var(--bs-white);
}

.badge-card-funding {
    background-color: #8b5cf6;
    color: #fff;
}

/* ── Reconciliation ──────────────────────────────────────────── */

.recon-pass  { color: var(--bs-success); }
.recon-fail  { color: var(--bs-danger); }

/* ── Inline edit ─────────────────────────────────────────────── */

[data-editable] {
    cursor: text;
}

[data-editable]:hover {
    background-color: var(--bs-warning-bg-subtle);
    border-radius: 3px;
}

/* ── Modal ───────────────────────────────────────────────────── */

#app-modal .modal-body-wrap {
    min-height: 120px;
}

/* ── Autocomplete ────────────────────────────────────────────── */

.autocomplete-dropdown {
    border: 1px solid var(--bs-border-color);
    border-radius: var(--bs-border-radius);
    background: var(--bs-body-bg);
}

.autocomplete-dropdown .list-group-item-action:hover,
.autocomplete-dropdown .list-group-item-action.active {
    background-color: var(--bs-primary-bg-subtle);
    color: var(--bs-body-color);
}

/* ── Review split layout ─────────────────────────────────────── */

@media (max-width: 1199px) {
    #review-split {
        flex-direction: column;
    }
    #pdf-panel {
        max-width: 100% !important;
    }
    #detail-panel {
        width: 100% !important;
        min-width: 0 !important;
    }
}

/* ── PDF viewer ──────────────────────────────────────────────── */

#pdf-scroll-area img {
    border-radius: 2px;
}

/* ── Drop zone ───────────────────────────────────────────────── */

#drop-zone.bg-primary-subtle {
    border-color: var(--bs-primary) !important;
}

/* ── Regex recommender preview ────────────────────────────────── */

.rec-prefix   { color: var(--bs-secondary); }
.rec-business { color: var(--bs-success); font-weight: 600; }
.rec-suffix   { color: var(--bs-secondary); }

/* ── Utilities ───────────────────────────────────────────────── */

.cursor-pointer { cursor: pointer; }
.min-w-0        { min-width: 0; }
