/* omniselect_detailedview.css */

/* =================================
    THEME VARIABLES — Inherited from omniselect_lists.css
    All variables match the parent theme exactly.
    ================================= */
:root {
    --list-background: #f9f9f9;
    --list-text-color: #333;
    --list-heading-border: #ddd;
    --table-header-background: #4CAF50;
    --table-header-text: white;
    --table-row-border: #eee;
    --table-row-hover-background: #e0f2f1;
    --list-name-color: #00796B;
    --load-btn-background: #00BCD4;
    --load-btn-hover-background: #0097A7;
    --no-lists-border: #ccc;
    --no-lists-text: #777;
    --back-link-color: #4CAF50;
    --box-shadow-color: rgba(0, 0, 0, 0.1);
    --body-background: #f8f8f8;
    --main-text-color: #333;
}

@media (prefers-color-scheme: dark) {
    :root {
        --list-background: #2a2a2a;
        --list-text-color: #e0e0e0;
        --list-heading-border: #444;
        --table-header-background: #38703a;
        --table-header-text: #e0e0e0;
        --table-row-border: #333;
        --table-row-hover-background: #3d3d3d;
        --list-name-color: #80CBC4;
        --load-btn-background: #006064;
        --load-btn-hover-background: #00838f;
        --no-lists-border: #555;
        --no-lists-text: #bbb;
        --back-link-color: #81C784;
        --box-shadow-color: rgba(0, 0, 0, 0.5);
        --body-background: #1c1c1c;
        --main-text-color: #ffffff;
    }
}

body[data-theme='dark'] {
    --list-background: #222;
    --list-text-color: #e0e0e0;
    --list-heading-border: #444;
    --table-header-background: #38703a;
    --table-header-text: #e0e0e0;
    --table-row-border: #333;
    --table-row-hover-background: #333;
    --list-name-color: #81C784;
    --load-btn-background: #006064;
    --load-btn-hover-background: #00838f;
    --no-lists-border: #555;
    --no-lists-text: #bbb;
    --back-link-color: #81C784;
    --box-shadow-color: rgba(0, 0, 0, 0.5);
    --body-background: #1a1a1a;
    --main-text-color: #e0e0e0;
}

/* =================================
    BODY — matches omniselect_lists.css
    ================================= */
body {
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
    background-color: var(--body-background);
    color: var(--main-text-color);
    transition: background-color 0.3s ease, color 0.3s ease;
}

/* =================================
    MAIN CONTAINER — mirrors .lists-container
    ================================= */
.details-container {
    max-width: 1100px;
    margin: 140px auto 40px auto;
    padding: 20px;
    background-color: var(--list-background);
    border-radius: 8px;
    box-shadow: 0 4px 10px var(--box-shadow-color);
    transition: background-color 0.3s ease, box-shadow 0.3s ease;
}

/* =================================
    SUMMARY CARD — top info block
    ================================= */
.list-summary-card {
    border-bottom: 2px solid var(--list-heading-border);
    padding-bottom: 20px;
    margin-bottom: 20px;
    transition: border-color 0.3s ease;
}

.list-summary-card h2 {
    color: var(--list-name-color);
    margin: 0 0 6px 0;
    font-size: 1.6em;
    transition: color 0.3s ease;
}

.summary-desc {
    color: var(--list-text-color);
    font-size: 1em;
    margin: 0 0 15px 0;
    opacity: 0.85;
    transition: color 0.3s ease;
}

.summary-header-layout {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    flex-wrap: wrap;
    gap: 15px;
}

/* =================================
    METADATA GRID
    ================================= */
.metadata-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 10px;
    margin-top: 15px;
}

.meta-item {
    font-size: 0.9em;
    color: var(--list-text-color);
    transition: color 0.3s ease;
}

.meta-item strong {
    color: var(--list-name-color);
    font-weight: 600;
    transition: color 0.3s ease;
}

/* =================================
    SECTION HEADING — "Included Items"
    ================================= */
.details-container h3 {
    color: var(--list-text-color);
    border-bottom: 2px solid var(--list-heading-border);
    padding-bottom: 10px;
    margin-bottom: 15px;
    font-size: 1.1em;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    transition: color 0.3s ease, border-color 0.3s ease;
}

/* =================================
    TABLE — mirrors .lists-table exactly
    ================================= */
.table-responsive-wrapper {
    width: 100%;
    overflow-x: auto;
}

.details-table {
    width: 100%;
    border-collapse: collapse;
    margin-top: 0;
}

.details-table th,
.details-table td {
    padding: 12px 15px;
    text-align: left;
    color: var(--list-text-color);
    transition: color 0.3s ease, border-color 0.3s ease;
}

.details-table th {
    background-color: var(--table-header-background);
    color: var(--table-header-text);
    font-weight: bold;
    text-transform: uppercase;
    font-size: 0.9em;
    border-bottom: 1px solid var(--table-row-border);
    transition: background-color 0.3s ease, color 0.3s ease;
}

.details-table td {
    border-bottom: 1px solid var(--table-row-border);
    vertical-align: middle;
}

.details-table tbody tr {
    transition: background-color 0.2s ease;
}

.details-table tbody tr:hover {
    background-color: var(--table-row-hover-background);
    cursor: default;
}

/* =================================
    TABLE FOOTER — aggregate row
    ================================= */
.details-table tfoot tr td {
    background-color: var(--table-header-background);
    color: var(--table-header-text);
    font-weight: bold;
    font-size: 0.95em;
    border-top: 2px solid var(--list-heading-border);
    border-bottom: none;
    transition: background-color 0.3s ease, color 0.3s ease;
}

/* =================================
    CELL VARIANTS
    ================================= */
.text-right {
    text-align: right !important;
}

.font-bold {
    font-weight: bold;
}

.rom-id-cell {
    font-family: 'Consolas', 'Courier New', monospace;
    font-size: 0.85em;
    opacity: 0.75;
}

.rom-title-cell {
    color: var(--list-name-color);
    font-weight: 600;
    transition: color 0.3s ease;
}

.meta-muted-text {
    font-size: 0.9em;
    opacity: 0.8;
}

.size-weight {
    font-variant-numeric: tabular-nums;
    font-weight: 500;
}

/* =================================
    PLATFORM BADGE — matches .load-btn style
    ================================= */
.badge {
    display: inline-block;
    padding: 3px 9px;
    font-size: 0.8em;
    font-weight: 600;
    border-radius: 4px;
    text-transform: uppercase;
    letter-spacing: 0.3px;
}

.platform-badge {
    background-color: var(--load-btn-background);
    color: #fff;
    transition: background-color 0.3s ease;
}

/* =================================
    DOWNLOAD BUTTON — matches .load-btn
    ================================= */
.download-btn {
    display: inline-block;
    padding: 8px 18px;
    background-color: var(--load-btn-background);
    color: white;
    text-decoration: none;
    border-radius: 4px;
    font-size: 0.9em;
    font-weight: bold;
    transition: background-color 0.2s ease;
}

.download-btn:hover {
    background-color: var(--load-btn-hover-background);
}

/* =================================
    BACK LINK
    ================================= */
.back-link {
    margin-bottom: 20px;
}

.back-btn {
    display: inline-block;
    color: var(--back-link-color);
    text-decoration: none;
    font-weight: 500;
    font-size: 0.95em;
    transition: color 0.3s ease, transform 0.2s ease;
}

.back-btn:hover {
    text-decoration: underline;
    transform: translateX(-2px);
}

/* =================================
    EMPTY / ERROR STATES
    ================================= */
.empty-detail-alert {
    padding: 30px;
    text-align: center;
    border: 1px dashed var(--no-lists-border);
    border-radius: 5px;
    color: var(--no-lists-text);
    transition: color 0.3s ease, border-color 0.3s ease;
}

.warning-text {
    color: #ff9800;
    font-size: 0.9em;
    font-style: italic;
}

.error-message {
    color: #e53935;
    font-size: 0.95em;
}