/* ================================================================
   Haitian History Timeline — Styles v1.0.1
   Colors: Blue #00209F · Red #D21034 · Gold #C9A826
   ================================================================ */

:root {
    --hht-blue: #00209F;
    --hht-red: #D21034;
    --hht-gold: #C9A826;
    --hht-bg: #FAFAF7;
    --hht-card: #FFFFFF;
    --hht-text: #1a1a1a;
    --hht-muted: #6b7280;
    --hht-border: #e5e7eb;
    --hht-serif: 'Georgia', 'Times New Roman', serif;
    --hht-sans: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
    --hht-mono: 'Courier New', Courier, monospace;
}

/* ── Wrapper ── */
.hht-wrapper {
    max-width: 820px;
    margin: 0 auto;
    font-family: var(--hht-sans);
    color: var(--hht-text);
    background: var(--hht-bg);
    border-radius: 12px;
    overflow: hidden;
    box-shadow: 0 2px 20px rgba(0,0,0,0.08);
    line-height: 1.6;
}
.hht-wrapper * { box-sizing: border-box; }

/* ── Flag Bar ── */
.hht-flag-bar {
    display: flex; height: 6px;
}
.hht-flag-blue { flex: 1; background: var(--hht-blue); }
.hht-flag-red  { flex: 1; background: var(--hht-red); }

/* ── Header ── */
.hht-header {
    background: linear-gradient(135deg, #001a7a 0%, var(--hht-blue) 60%, #002db3 100%);
    color: #fff;
    padding: 28px 24px 20px;
    text-align: center;
}
.hht-header-label {
    font-size: 11px;
    letter-spacing: 2.5px;
    text-transform: uppercase;
    opacity: 0.65;
    margin-bottom: 6px;
}
.hht-header-title {
    font-family: var(--hht-serif);
    font-size: 26px;
    font-weight: 700;
    margin: 0 0 6px;
    line-height: 1.2;
}
.hht-header-date {
    font-size: 14px;
    opacity: 0.8;
    font-weight: 500;
}

/* ── Date Picker ── */
.hht-picker {
    padding: 14px 20px;
    background: #f0f0ec;
    border-bottom: 1px solid var(--hht-border);
}
.hht-picker-form {
    display: flex;
    gap: 8px;
    align-items: center;
    justify-content: center;
    flex-wrap: wrap;
}
.hht-picker-select {
    padding: 8px 12px;
    border: 1px solid #ccc;
    border-radius: 6px;
    font-size: 14px;
    background: #fff;
    font-family: var(--hht-sans);
}
.hht-picker-btn {
    padding: 8px 20px;
    background: var(--hht-blue);
    color: #fff;
    border: none;
    border-radius: 6px;
    font-size: 14px;
    font-weight: 600;
    cursor: pointer;
    transition: background 0.2s;
}
.hht-picker-btn:hover { background: #001a7a; }

/* ── Sections ── */
.hht-section {
    padding: 16px 20px;
}
.hht-section-label {
    display: flex;
    align-items: center;
    gap: 8px;
    font-size: 13px;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 1.5px;
    color: var(--hht-blue);
    padding: 10px 14px;
    background: #eef1f8;
    border-left: 4px solid var(--hht-blue);
    border-radius: 4px;
    margin-bottom: 14px;
}
.hht-section-dot {
    width: 10px; height: 10px;
    border-radius: 50%;
    display: inline-block;
    flex-shrink: 0;
}
.hht-dot-red  { background: var(--hht-red); }
.hht-dot-blue { background: var(--hht-blue); }
.hht-badge {
    background: var(--hht-red);
    color: #fff;
    font-size: 11px;
    padding: 2px 8px;
    border-radius: 10px;
    margin-left: auto;
    font-weight: 700;
}
.hht-badge-blue { background: var(--hht-blue); }

/* ── Today Cards ── */
.hht-today-cards {
    display: flex;
    flex-direction: column;
    gap: 12px;
}
.hht-today-card {
    display: flex;
    gap: 16px;
    align-items: flex-start;
    background: var(--hht-card);
    border: 1px solid var(--hht-border);
    border-left: 4px solid var(--hht-red);
    border-radius: 8px;
    padding: 16px;
    transition: box-shadow 0.2s;
}
.hht-today-card:hover {
    box-shadow: 0 2px 12px rgba(0,32,159,0.1);
}
.hht-today-year {
    font-family: var(--hht-serif);
    font-size: 28px;
    font-weight: 700;
    color: var(--hht-blue);
    min-width: 70px;
    text-align: center;
    line-height: 1.1;
    flex-shrink: 0;
}
.hht-today-body { flex: 1; }
.hht-today-text {
    font-size: 15px;
    color: var(--hht-text);
    line-height: 1.6;
}

/* ── Empty State ── */
.hht-empty {
    text-align: center;
    padding: 40px 20px;
    color: var(--hht-muted);
}
.hht-empty-icon { font-size: 48px; margin-bottom: 12px; }
.hht-empty p { margin: 4px 0; font-size: 15px; }
.hht-empty-sub { font-size: 13px !important; opacity: 0.7; }

/* ── Timeline (Month / Full) ── */
.hht-timeline {
    display: flex;
    flex-direction: column;
    gap: 10px;
}
.hht-timeline-scroll {
    max-height: 500px;
    overflow-y: auto;
    padding-right: 4px;
}
.hht-event {
    display: flex;
    gap: 12px;
    align-items: flex-start;
}
.hht-event-year {
    font-family: var(--hht-mono);
    font-size: 13px;
    font-weight: 700;
    color: var(--hht-blue);
    min-width: 110px;
    text-align: right;
    padding-top: 4px;
    flex-shrink: 0;
}
.hht-event-line {
    width: 3px;
    min-height: 100%;
    background: linear-gradient(180deg, var(--hht-blue), var(--hht-red));
    border-radius: 2px;
    flex-shrink: 0;
    align-self: stretch;
}
.hht-event-card {
    flex: 1;
    background: var(--hht-card);
    border: 1px solid var(--hht-border);
    border-radius: 8px;
    padding: 12px 14px;
}
.hht-event-text {
    font-size: 14px;
    line-height: 1.6;
    color: var(--hht-text);
}

/* ── Tags ── */
.hht-event-tags {
    display: flex;
    flex-wrap: wrap;
    gap: 6px;
    margin-top: 8px;
}
.hht-tag {
    font-size: 11px;
    padding: 2px 10px;
    border-radius: 12px;
    background: #eef1f8;
    color: var(--hht-blue);
    font-weight: 600;
    letter-spacing: 0.3px;
}

/* ── Era Tabs ── */
.hht-era-tabs {
    display: flex;
    flex-wrap: wrap;
    gap: 6px;
    padding: 14px 20px;
    background: #f0f0ec;
    border-bottom: 1px solid var(--hht-border);
}
.hht-era-tab {
    padding: 6px 16px;
    border: 1px solid #ccc;
    border-radius: 20px;
    background: #fff;
    font-size: 13px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.2s;
    font-family: var(--hht-mono);
    color: var(--hht-text);
}
.hht-era-tab:hover { border-color: var(--hht-blue); color: var(--hht-blue); }
.hht-tab-active {
    background: var(--hht-blue) !important;
    color: #fff !important;
    border-color: var(--hht-blue) !important;
}

/* ── Era Group ── */
.hht-era-group {
    padding: 16px 20px;
    border-bottom: 1px solid var(--hht-border);
}
.hht-era-group.hht-hidden { display: none; }
.hht-era-header {
    display: flex;
    align-items: center;
    gap: 10px;
    margin-bottom: 14px;
}
.hht-era-badge {
    font-family: var(--hht-mono);
    font-size: 14px;
    font-weight: 700;
    padding: 4px 14px;
    border-radius: 6px;
    color: #fff;
}
.hht-era-count {
    font-size: 13px;
    color: var(--hht-muted);
}

/* ── Era Colors ── */
.hht-era-1400 .hht-era-badge, .hht-era-1400.hht-era-badge { background: #6B8E23; }
.hht-era-1500 .hht-era-badge, .hht-era-1500.hht-era-badge { background: #8B6914; }
.hht-era-1600 .hht-era-badge, .hht-era-1600.hht-era-badge { background: #8B4513; }
.hht-era-1700 .hht-era-badge, .hht-era-1700.hht-era-badge { background: var(--hht-red); }
.hht-era-1800 .hht-era-badge, .hht-era-1800.hht-era-badge { background: var(--hht-blue); }
.hht-era-1900 .hht-era-badge, .hht-era-1900.hht-era-badge { background: #5D3FD3; }
.hht-era-2000 .hht-era-badge, .hht-era-2000.hht-era-badge { background: #C0392B; }

/* ── Footer ── */
.hht-footer {
    text-align: center;
    padding: 14px 20px;
    font-size: 12px;
    color: var(--hht-muted);
}
.hht-footer a { color: var(--hht-blue); text-decoration: none; }
.hht-footer a:hover { text-decoration: underline; }

/* ── Responsive ── */
@media (max-width: 600px) {
    .hht-header-title { font-size: 20px; }
    .hht-today-card { flex-direction: column; gap: 8px; }
    .hht-today-year { font-size: 22px; min-width: auto; text-align: left; }
    .hht-event-year { min-width: 80px; font-size: 11px; }
    .hht-era-tabs { justify-content: center; }
    .hht-section-label { font-size: 11px; }
}
