/* ===== Object list table ===== */
.object-list-table {
    width: 100%;
    border-collapse: collapse;
    font-size: 0.875rem; /* 14px */
}

.object-list-table thead th,
.object-list-table thead td {
    padding: 0.625rem 1.25rem;
    text-align: left;
    font-size: 0.75rem; /* 12px */
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    color: #475569; /* slate-600 */
    white-space: nowrap;
    background-color: #f8fafc; /* slate-50 */
}

.dark .object-list-table thead th,
.dark .object-list-table thead td {
    color: #94a3b8; /* slate-400 */
    background-color: rgba(15, 23, 42, 0.3);
}

.object-list-table tbody tr {
    border-top: 1px solid #e2e8f0; /* slate-200 */
    transition: background-color 150ms;
}

.dark .object-list-table tbody tr {
    border-top-color: rgba(148, 163, 184, 0.1); /* slate-400/10 */
}

.object-list-table tbody tr:hover {
    background-color: #f8fafc; /* slate-50 */
}

.dark .object-list-table tbody tr:hover {
    background-color: rgba(148, 163, 184, 0.05);
}

.object-list-table tbody td {
    padding: 0.625rem 1.25rem;
    vertical-align: middle;
    color: #1e293b; /* slate-800 */
}

.dark .object-list-table tbody td {
    color: #e2e8f0; /* slate-200 */
}

/* Secondary/muted text inside table cells */
.object-list-table tbody td small,
.object-list-table tbody td .text-muted,
.object-list-table tbody td [class*="text-slate-4"],
.object-list-table tbody td [class*="text-slate-5"] {
    font-size: 0.8125rem; /* 13px */
    color: #475569 !important; /* slate-600 */
}

.dark .object-list-table tbody td small,
.dark .object-list-table tbody td .text-muted,
.dark .object-list-table tbody td [class*="text-slate-4"],
.dark .object-list-table tbody td [class*="text-slate-5"] {
    color: #94a3b8 !important; /* slate-400 */
}

/* Pagination toolbar */
.object-list-table tfoot tr td {
    padding: 0;
    border-top: 1px solid #e2e8f0;
}

.dark .object-list-table tfoot tr td {
    border-top-color: rgba(148, 163, 184, 0.1);
}

/* Nav label: "Showing X to Y of Z" */
.flexi-nav-label {
    font-size: 0.8125rem; /* 13px */
    color: #64748b; /* slate-500 */
}

.dark .flexi-nav-label {
    color: #94a3b8; /* slate-400 */
}

/* Paging button group */
.flexi-pager {
    display: inline-flex;
    align-items: center;
    border-radius: 0.375rem;
    border: 1px solid #e2e8f0;
    overflow: hidden;
}

.dark .flexi-pager {
    border-color: rgba(148, 163, 184, 0.15);
}

/* flatten the .goto wrapper so page links sit inline with first/prev/next/last */
.flexi-pager .goto {
    display: contents;
}

/* all button-like elements — base style */
.flexi-pager a.first,
.flexi-pager a.prev,
.flexi-pager a.next,
.flexi-pager a.last,
.flexi-pager .goto a {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-width: 2rem;
    height: 2rem;
    padding: 0 0.375rem;
    font-size: 0.75rem;
    font-weight: 500;
    color: #475569;
    background: #fff;
    border-right: 1px solid #e2e8f0;
    text-decoration: none;
    transition: background 150ms, color 150ms;
    white-space: nowrap;
    user-select: none;
}

.dark .flexi-pager a.first,
.dark .flexi-pager a.prev,
.dark .flexi-pager a.next,
.dark .flexi-pager a.last,
.dark .flexi-pager .goto a {
    color: #94a3b8;
    background: #1e293b;
    border-right-color: rgba(148, 163, 184, 0.15);
}

/* remove border from last button */
.flexi-pager a.last { border-right: none; }

/* hover — only enabled (href present) buttons */
.flexi-pager a.first[href]:hover,
.flexi-pager a.prev[href]:hover,
.flexi-pager a.next[href]:hover,
.flexi-pager a.last[href]:hover,
.flexi-pager .goto a[href]:hover {
    background: #f1f5f9;
    color: #1e293b;
}

.dark .flexi-pager a.first[href]:hover,
.dark .flexi-pager a.prev[href]:hover,
.dark .flexi-pager a.next[href]:hover,
.dark .flexi-pager a.last[href]:hover,
.dark .flexi-pager .goto a[href]:hover {
    background: rgba(148, 163, 184, 0.08);
    color: #e2e8f0;
}

/* current page — Wicket 10 keeps <a> but adds disabled attribute */
.flexi-pager .goto a[disabled] {
    font-weight: 600;
    color: #6366f1;
    background: #eef2ff;
    cursor: default;
    pointer-events: none;
}

.dark .flexi-pager .goto a[disabled] {
    color: #818cf8;
    background: rgba(99, 102, 241, 0.15);
}

/* disabled nav buttons (first/prev on page 1, next/last on last page) */
.flexi-pager a.first[disabled],
.flexi-pager a.prev[disabled],
.flexi-pager a.next[disabled],
.flexi-pager a.last[disabled] {
    color: #cbd5e1;
    cursor: default;
    pointer-events: none;
}

.dark .flexi-pager a.first[disabled],
.dark .flexi-pager a.prev[disabled],
.dark .flexi-pager a.next[disabled],
.dark .flexi-pager a.last[disabled] {
    color: #334155;
}

/* Wicket sort icons */
.object-list-table thead th[class*="wicket_order"] {
    white-space: nowrap;
}

.object-list-table thead th[class*="wicket_order"] a {
    color: inherit;
    text-decoration: none;
    display: inline-flex;
    align-items: center;
    gap: 0.3rem;
}

.object-list-table thead th[class*="wicket_order"] a:hover {
    color: #6366f1; /* indigo-500 */
}

.object-list-table thead th.wicket_orderUp a::before,
.object-list-table thead th.wicket_orderDown a::before {
    display: inline-block;
    color: #6366f1; /* indigo-500 */
    font-size: 80%;
}

.object-list-table thead th.wicket_orderUp a::before  { content: "\25B2"; } /* ▲ */
.object-list-table thead th.wicket_orderDown a::before { content: "\25BC"; } /* ▼ */

/* Row status variants (used by Java backend) */
.object-list-table tr.bg-gradient-danger {
    background-color: rgba(239, 68, 68, 0.06) !important;
}

.object-list-table tr.bg-gradient-success {
    background-color: rgba(34, 197, 94, 0.06) !important;
}

.object-list-table tr.bg-gradient-warning {
    background-color: rgba(245, 158, 11, 0.06) !important;
}

.object-list-table tr.bg-gradient-info {
    background-color: rgba(99, 102, 241, 0.06) !important;
}

.object-list-table .disabled {
    cursor: not-allowed !important;
    opacity: 0.6;
}


/* ===== Sidebar navigation active state ===== */
/* Tree parent items: Java appends " active" on <summary> */
nav summary.active {
    color: #fff;
    background-color: rgba(255, 255, 255, 0.12);
}

/* ===== Tab pane (Bootstrap compat) ===== */
.tab-content .tab-pane.fade:not(.show) {
    display: none;
}

/* ===== Alert box styles (used by AlertBox Java component) ===== */
.alert {
    border-left: 4px solid;
    padding: 1rem;
    margin-bottom: 1.5rem;
}

/* Error */
.alert-danger, .alert-error {
    background-color: #fef2f2; /* red-50 */
    border-left-color: #f87171; /* red-400 */
    color: #991b1b; /* red-800 */
}
.dark .alert-danger, .dark .alert-error {
    background-color: rgba(239, 68, 68, 0.15);
    border-left-color: #ef4444; /* red-500 */
    color: #fecaca; /* red-200 */
    outline: 1px solid rgba(239, 68, 68, 0.25);
}
.alert-danger .alert-icon, .alert-error .alert-icon {
    color: #f87171;
}
.dark .alert-danger .alert-icon, .dark .alert-error .alert-icon {
    color: #ef4444;
}

/* Success */
.alert-success {
    background-color: #f0fdf4; /* green-50 */
    border-left-color: #16a34a; /* green-600 */
    color: #15803d; /* green-700 */
}
.dark .alert-success {
    background-color: rgba(34, 197, 94, 0.15);
    border-left-color: #22c55e; /* green-500 */
    color: #bbf7d0; /* green-200 */
    outline: 1px solid rgba(34, 197, 94, 0.25);
}
.alert-success .alert-icon {
    color: #16a34a; /* green-600 */
}
.dark .alert-success .alert-icon {
    color: #22c55e;
}

/* Warning */
.alert-warning {
    background-color: #fefce8; /* yellow-50 */
    border-left-color: #facc15; /* yellow-400 */
    color: #a16207; /* yellow-700 */
}
.dark .alert-warning {
    background-color: rgba(234, 179, 8, 0.1);
    border-left-color: #eab308; /* yellow-500 */
    color: #fde047; /* yellow-300 */
    outline: 1px solid rgba(234, 179, 8, 0.25);
}
.alert-warning .alert-icon {
    color: #facc15;
}
.dark .alert-warning .alert-icon {
    color: #eab308;
}

/* Info */
.alert-info {
    background-color: #eef2ff; /* indigo-50 */
    border-left-color: #818cf8; /* indigo-400 */
    color: #3730a3; /* indigo-800 */
}
.dark .alert-info {
    background-color: rgba(99, 102, 241, 0.15);
    border-left-color: #6366f1; /* indigo-500 */
    color: #c7d2fe; /* indigo-200 */
    outline: 1px solid rgba(99, 102, 241, 0.25);
}
.alert-info .alert-icon {
    color: #818cf8;
}
.dark .alert-info .alert-icon {
    color: #6366f1;
}

/* ===== FeedbackPanel (Wicket validation messages) ===== */
.feedback-panel ul {
    list-style: none;
    margin: 0;
    padding: 0;
}
.feedback-panel ul li::first-letter {
    text-transform: uppercase;
}
.feedback-panel ul li + li {
    margin-top: 0.25rem;
}

/* ===== PhotoComponent ===== */
.photoComponent {}
.photoComponent .no-photo {
    width: 100%;
    padding-top: 66.6%;
    position: relative;
    background-color: #f1f5f9;
    text-align: center;
    cursor: pointer;
    border-radius: 0.5rem;
    border: 2px dashed #e2e8f0;
    transition: background-color 150ms, border-color 150ms;
}

.dark .photoComponent .no-photo {
    background-color: rgba(148, 163, 184, 0.05);
    border-color: rgba(148, 163, 184, 0.15);
}

.photoComponent .no-photo > .inner {
    width: 100%;
    position: absolute;
    top: 29%;
    color: #94a3b8;
}

.photoComponent .no-photo > .inner .far,
.photoComponent .no-photo > .inner .fas {
    font-size: 2.5rem;
    color: #cbd5e1;
}

.photoComponent .no-photo > .inner .fas { display: none; }
.photoComponent .no-photo > .inner .text { margin-top: 0.625rem; font-size: 0.8125rem; }
.photoComponent .no-photo:hover { background-color: #e2e8f0; border-color: #6366f1; }
.dark .photoComponent .no-photo:hover { background-color: rgba(99, 102, 241, 0.08); border-color: rgba(99, 102, 241, 0.4); }
.photoComponent .no-photo:hover > .inner .far  { display: none; }
.photoComponent .no-photo:hover > .inner .fas  { display: inline-block; color: #6366f1; }

/* Ajax overlay is handled via Tailwind `hidden` class in the HTML */
