/* ========================================
   QUESTIONS PAGE LAYOUT
   questions-layout.css
   ======================================== */

/* ========================================
   MAIN TWO-PANEL LAYOUT
   ======================================== */

#questions-main {
    display: grid;
    grid-template-columns: 300px 1fr;
    height: 100%;
    overflow: hidden;
}

/* ========================================
   LEFT PANEL - Question List
   ======================================== */

#questions-left {
    border-right: 1px solid #e5e5e5;
    display: flex;
    flex-direction: column;
    overflow: hidden;
    background: #fafafa;
}

.questions-left-header {
    font-size: 11px;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 1px;
    color: #999;
    padding: 20px 20px 12px 20px;
    flex-shrink: 0;
}

#questions-list {
    flex: 1;
    overflow-y: auto;
    padding: 0 0 24px 0;
}

/* Individual question item in left panel */
.question-item {
    padding: 14px 20px 14px 24px;
    border-left: 3px solid transparent;
    cursor: pointer;
    transition: background-color 0.15s ease;
}

.question-item:hover {
    background: #f0f0f0;
}

.question-item.active {
    border-left-color: #c00;
    background: #fff;
}

.question-item.active:hover {
    background: #f8f8f8;
}

.question-item.selected {
    border-left-color: #c00;
    background: #fff;
}

.question-item-title {
    font-size: 15px;
    font-weight: 600;
    color: #111;
    line-height: 1.3;
    margin-bottom: 6px;
}

.question-item.inactive .question-item-title {
    color: #555;
    font-weight: 500;
}

.question-item-date {
    font-size: 12px;
    color: #aaa;
    font-weight: 400;
}

.question-coming-soon {
    font-size: 12px;
    color: #bbb;
    font-weight: 400;
    font-style: italic;
    margin-top: 4px;
}

/* ========================================
   RIGHT PANEL - Question Detail
   ======================================== */

#questions-right {
    display: flex;
    flex-direction: column;
    overflow: hidden;
    background: #fff;
}

#question-detail {
    display: flex;
    flex-direction: column;
    height: 100%;
    overflow: hidden;
}

/* Fixed header: title + full question + timeline */
#question-header {
    flex-shrink: 0;
    padding: 28px 36px 0 36px;
    border-bottom: 1px solid #e5e5e5;
    background: #fff;
}

/* Scrollable story sections */
#question-sections {
    flex: 1;
    overflow-y: auto;
    padding: 24px 36px 48px 36px;
}

/* Question title at top of detail */
.question-detail-title {
    font-size: 22px;
    font-weight: 700;
    color: #111;
    line-height: 1.3;
    margin-bottom: 10px;
}

/* Full question text below title */
.question-full-text {
    font-size: 15px;
    color: #555;
    line-height: 1.6;
    font-weight: 400;
    margin-bottom: 20px;
    max-width: 720px;
}

/* Coming soon placeholder in detail panel */
.question-coming-soon-detail {
    padding: 40px 0 20px;
    color: #aaa;
    font-size: 15px;
    font-style: italic;
}

/* ========================================
   TIMELINE
   ======================================== */

.question-timeline {
    position: relative;
    margin-bottom: 8px;
    padding: 8px 0 40px 0;
    user-select: none;
}

/* The horizontal track line */
.timeline-track {
    position: absolute;
    top: 16px;
    left: 0;
    right: 0;
    height: 2px;
    background: #e0e0e0;
}

/* Wrapper that holds dots + labels, positioned relative to track */
.timeline-dots {
    position: relative;
    height: 60px;
}

/* Individual dot wrapper */
.timeline-dot-wrapper {
    position: absolute;
    transform: translateX(-50%);
    display: flex;
    flex-direction: column;
    align-items: center;
}

/* The circle dot */
.timeline-dot {
    width: 14px;
    height: 14px;
    border-radius: 50%;
    background: #ccc;
    border: 2px solid #fff;
    box-shadow: 0 0 0 1px #ccc;
    cursor: pointer;
    transition: transform 0.15s ease, box-shadow 0.15s ease;
    margin-top: 9px;
    flex-shrink: 0;
}

.timeline-dot.active {
    transform: scale(1.4);
    box-shadow: 0 0 0 2px var(--dot-color, #999);
}

.timeline-dot-label {
    position: absolute;
    top: 30px;
    text-align: center;
    width: 90px;
    transform: translateX(-50%);
    left: 50%;
    font-size: 11px;
    color: #666;
    line-height: 1.3;
    pointer-events: none;
}

.timeline-dot-label .dot-outlet {
    font-weight: 600;
    color: #333;
    display: block;
}

.timeline-dot-label .dot-date {
    color: #999;
    display: block;
}

/* Bias color legend */
.timeline-legend {
    display: flex;
    flex-wrap: wrap;
    gap: 14px;
    margin-top: 4px;
    margin-bottom: 24px;
}

.legend-item {
    display: inline-flex;
    align-items: center;
    gap: 5px;
    font-size: 12px;
    color: #555;
}

.legend-dot {
    width: 10px;
    height: 10px;
    border-radius: 50%;
    flex-shrink: 0;
}

/* ========================================
   STORY SECTIONS
   ======================================== */

.question-section {
    margin-bottom: 32px;
    scroll-margin-top: 20px;
}

.section-label {
    font-size: 11px;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 1.5px;
    color: #999;
    margin-bottom: 10px;
    padding-bottom: 6px;
    border-bottom: 1px solid #eee;
}

.section-narrative {
    font-size: 15px;
    color: #444;
    line-height: 1.6;
    margin-bottom: 14px;
    padding-left: 12px;
    border-left: 3px solid #e5e5e5;
    font-weight: 400;
}

/* Story card within a section — reuse .story styles from style.css,
   but constrain to this context */
.question-section .story {
    border: 1px solid #e5e5e5;
    border-radius: 6px;
    padding: 12px;
    margin: 0;
    background: #fff;
    box-shadow: 0 1px 3px rgba(0,0,0,0.05);
}

.question-section .story:hover {
    background: #f8f8f8;
    box-shadow: 0 2px 6px rgba(0,0,0,0.08);
}

/* ========================================
   ACTIVE NAV LINK
   ======================================== */

#menus a.active-nav {
    color: #0000CC;
    border-bottom: 2px solid #0000CC;
    padding-bottom: 2px;
}

/* ========================================
   EMPTY / LOADING STATES
   ======================================== */

.question-empty {
    padding: 40px 20px;
    color: #888;
    font-size: 15px;
    text-align: center;
}
