/* css/pages/toc-page.css */

.toc-container {
    list-style: none; padding: 0; margin: 0; font-family: 'Frank Ruhl Libre', serif;
    /*background-color: var(--surface-color); border: 1px solid var(--border-color);*/
    border-radius: 12px; /*padding: 16px 24px;*/
    max-width: 600px;
    margin: 0 auto;
}

/* --- NEW LAYOUT STYLES --- */
.toc-item a {
    display: flex;
    flex-direction: column; /* Stack top-row and subtitle vertically */
    gap: 8px; /* Space between the two rows */
    padding: 16px 4px;
    margin-bottom: 5px;
    border-radius: 6px;
    transition: background-color 0.2s;
    
}
.toc-item:last-child a {
    border-bottom: none; /* Remove line from last item */
}
.toc-item a:hover { background-color:var(--border-color); }


/* Top Row: Contains Title, Leader, and Page Number */
.toc-top-row {
    display: flex;
    align-items: baseline;
    justify-content: space-between;
    width: 100%;
    direction: rtl; /* This puts the title on the right */
}
.toc-main-title {
    font-size: 19px;
    font-weight: 500;
}

/* --- NEW RULE FOR VOLUME PREFIX --- */
.toc-volume-prefix {
    font-weight: 600; /* Bolder than the title */
    color: var(--primary-text);
    margin-left: 0.5em; /* Space between prefix and title */
}

.toc-leader {
    flex-grow: 1;
    margin: 0 1.5em;
}
.toc-page-number {
    font-family: 'Inter', sans-serif;
    font-size: 16px;
    font-weight: 500;
    color: var(--subtle-text);
    direction: ltr; /* Ensures numbers are read left-to-right */
}


/* Bottom Row: Contains the full subtitle/summary */
.toc-subtitle {
    font-size: 16px;
    line-height: 1.6;
    color: var(--secondary-text);
    direction: rtl;
    text-align: justify;
    padding-right: 4px; /* Align with the title above */
}

/* --- Style Variants (largely unchanged) --- */
.leader-line-style .toc-leader { border-bottom: 2px dotted var(--border-color); transform: translateY(-4px); }
.solid-line-style .toc-leader { border-bottom: 1px solid var(--border-color); transform: translateY(-4px); }
.simple-list-style { padding: 0; }
.simple-list-style .toc-item a { justify-content: center; text-align: center; padding: 20px; }
.simple-list-style .toc-page-number, .simple-list-style .toc-leader, .simple-list-style .toc-subtitle { display: none; }