/* Daily Hub — Lagom theme */
/* Font: Open Sans (same as site body). Sizes in pt, min 12pt. Text colors min #666. */
/* FA5 loaded via CDN only on this page — no inline content defs needed here. */

.daily-hub {
    max-width: 720px;
    margin: 24px auto;
    padding: 0 16px 48px;
    font-family: 'Open Sans', sans-serif;
}

/* Force Open Sans on all headings inside daily-hub */
.daily-hub h3,
.daily-hub h4 {
    font-family: 'Open Sans', sans-serif;
}

/* ── Welcome Message ── */
.dh-welcome {
    text-align: center;
    padding: 14px 16px;
    margin-bottom: 16px;
    background: linear-gradient(135deg, #fffbf5 0%, #fff5e6 100%);
    border-radius: 10px;
    border: 1px solid #f0e6d6;
}

.dh-welcome p {
    margin: 0;
    font-size: 12pt;
    color: #555;
}

/* Welcome logged-in (post-registration redirect) */
.dh-welcome-logged {
    text-align: center;
    padding: 14px 16px;
    margin-bottom: 16px;
    background: linear-gradient(135deg, #f0faf0 0%, #e8f5e9 100%);
    border-radius: 10px;
    border: 1px solid #c8e6c9;
    animation: dhFadeIn .5s ease;
}

.dh-welcome-logged p {
    margin: 0;
    font-size: 12pt;
    color: #2e7d32;
    font-weight: 600;
}

@keyframes dhFadeIn {
    from { opacity: 0; transform: translateY(-8px); }
    to { opacity: 1; transform: translateY(0); }
}

/* ── Streak Hero ── */
.dh-streak-hero {
    text-align: center;
    padding: 32px 16px 24px;
    margin-bottom: 24px;
    background: #fffbf5;
    border-radius: 12px;
    border: 1px solid #f0e6d6;
}

.dh-streak-number {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 12px;
}

.dh-streak-count {
    font-size: 36pt;
    font-weight: 700;
    line-height: 1;
    color: #333;
}

.dh-fire { font-size: 28pt; }
.dh-fire-low { color: #666; }
.dh-fire-medium { color: #e8850c; }
.dh-fire-high { color: #e8850c; }
.dh-fire-legendary { color: #d63031; text-shadow: 0 0 8px rgba(214, 48, 49, .4); }

.dh-streak-label {
    color: #555;
    margin: 4px 0 0;
    font-size: 12pt;
}

.dh-near-record {
    color: #e8850c;
    font-weight: 600;
    margin: 8px 0 0;
    font-size: 12pt;
}

.dh-record {
    color: #666;
    font-size: 12pt;
    margin: 4px 0 0;
}

.dh-multiplier-badge {
    display: inline-block;
    background: #4caf50;
    color: #fff;
    border-radius: 12px;
    padding: 2px 10px;
    font-size: 12pt;
    font-weight: 600;
    margin-top: 8px;
}

/* Dot calendar (NYT-style weekly) */
.dh-dot-calendar {
    display: flex;
    justify-content: center;
    gap: 12px;
    margin-top: 16px;
}

.dh-dot-day {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 4px;
}

.dh-dot {
    width: 16px;
    height: 16px;
    border-radius: 50%;
    background: #d5d5d5;
    border: 2px solid transparent;
    box-sizing: border-box;
}

.dh-dot.active {
    background: #f5a623;
    border-color: #f5a623;
}

/* Today not yet played — hollow orange ring = "fill me" */
.dh-dot.today {
    background: #fff;
    border-color: #f5a623;
}

/* Today already played — solid orange */
.dh-dot.today.active {
    background: #f5a623;
}

.dh-dot.future {
    background: #ececec;
    opacity: .35;
}

.dh-dot-label {
    font-size: 9pt;
    color: #999;
    text-transform: uppercase;
    line-height: 1;
}

.dh-ghost-cta {
    margin-top: 12px;
    font-size: 12pt;
}

.dh-ghost-cta a {
    color: #e8850c;
    text-decoration: underline;
}

/* ── Game Cards ── */
.dh-games {
    margin-bottom: 24px;
}

.dh-game-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 12px;
}

.dh-game-card {
    background: #fff;
    border: 1px solid #e8e8e8;
    border-radius: 8px;
    padding: 16px;
    display: flex;
    flex-direction: column;
    gap: 8px;
    position: relative;
}

/* Primary card (Ordgåtan) — more prominent */
.dh-game-card-primary {
    border-color: #f5a623;
    border-width: 2px;
    background: linear-gradient(180deg, #fffbf5 0%, #fff 40%);
}

/* "Dagens spel" tag */
.dh-game-tag {
    position: absolute;
    top: -10px;
    left: 16px;
    background: #f5a623;
    color: #fff;
    font-size: 10pt;
    font-weight: 600;
    padding: 2px 10px;
    border-radius: 10px;
    line-height: 1.4;
    letter-spacing: 0.02em;
}

/* Secondary tag style */
.dh-game-tag-secondary {
    background: #888;
}

/* Secondary card (Challenge) — subtler */
.dh-game-card-secondary {
    opacity: 0.92;
    padding-top: 20px;
}

.dh-game-icon {
    font-size: 18pt;
    color: #e8850c;
}

.dh-game-info h3 {
    font-size: 13pt;
    font-weight: 600;
    margin: 0;
    color: #333;
    font-family: 'Open Sans', sans-serif;
}

.dh-status {
    display: inline-block;
    font-size: 12pt;
    margin-top: 4px;
}

.dh-status-done { color: #4caf50; }
.dh-status-progress { color: #e8850c; }
.dh-status-new { color: #666; }

/* Challenge clue preview */
.dh-challenge-clue {
    font-size: 12pt;
    font-weight: 600;
    color: #333;
    font-style: italic;
    margin: 2px 0 0;
    line-height: 1.3;
}

.dh-challenge-letters {
    display: inline-block;
    font-size: 10pt;
    color: #666;
    margin-top: 2px;
}

.dh-game-cta {
    margin-top: auto;
}

.dh-game-cta .btn {
    width: 100%;
    font-size: 12pt;
}

/* Daily progress */
.dh-daily-progress {
    margin-top: 16px;
    text-align: center;
}

.dh-daily-progress-bar {
    height: 6px;
    background: #e8e8e8;
    border-radius: 3px;
    overflow: hidden;
}

.dh-daily-progress-fill {
    height: 100%;
    background: #4caf50;
    border-radius: 3px;
    transition: width .4s ease;
}

.dh-daily-progress-label {
    font-size: 12pt;
    color: #666;
    margin-top: 6px;
    display: block;
}

/* ── Stats (logged-in) ── */
.dh-stats-section {
    margin-bottom: 24px;
}

.dh-stats {
    display: grid;
    grid-template-columns: auto 1fr auto;
    gap: 12px;
}

.dh-stat-box {
    background: #fff;
    border: 1px solid #e8e8e8;
    border-radius: 8px;
    padding: 16px;
    text-align: center;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
}

/* XP bar override — larger and orange */
.dh-stats .xp-progress {
    height: 18px;
    border-radius: 9px;
}

.dh-stats .xp-progress .progress-bar {
    background: linear-gradient(90deg, #e8850c, #f5a623);
}

.dh-stat-number {
    font-size: 22pt;
    font-weight: 700;
    color: #333;
    line-height: 1.2;
}

.dh-stat-label {
    font-size: 12pt;
    color: #555;
    margin-top: 4px;
}

/* ── Stats Zero-state (non-logged) ── */
.dh-stats-zero {
    border-radius: 8px;
}

.dh-stats-zero-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 12px;
}

.dh-stats-zero .dh-stat-box {
    background: #fafafa;
    border: 1px solid #e8e8e8;
}

.dh-stat-save-cta {
    display: block;
    margin-top: 6px;
    font-size: 9pt;
    color: #e8850c;
    text-decoration: none;
    font-weight: 600;
}

.dh-stat-save-cta:hover {
    color: #c97208;
    text-decoration: underline;
}

.dh-stats-zero .dh-stat-number {
    color: #666;
}

.dh-stats-zero .dh-stat-level {
    color: #e8850c;
}

.dh-stats-zero .dh-stat-label {
    color: #666;
}

.dh-stats-zero-banner {
    text-align: center;
    margin-top: 10px;
    padding: 10px 16px;
    background: #fffbf5;
    border: 1px solid #f0e6d6;
    border-radius: 8px;
}

.dh-stats-zero-banner a {
    color: #e8850c;
    font-size: 12pt;
    font-weight: 600;
    text-decoration: none;
}

.dh-stats-zero-banner a:hover {
    color: #c97208;
    text-decoration: underline;
}

/* ── Community ── */
.dh-community {
    margin-bottom: 24px;
    text-align: center;
}

.dh-players-week {
    font-size: 12pt;
    color: #555;
    margin-bottom: 16px;
}

.dh-section-title {
    font-size: 14pt;
    font-weight: 600;
    color: #333;
    margin-bottom: 12px;
    font-family: 'Open Sans', sans-serif;
}

.dh-top-players {
    display: flex;
    justify-content: center;
    gap: 24px;
    flex-wrap: wrap;
}

.dh-top-player {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 4px;
}

.dh-top-rank {
    font-size: 12pt;
    font-weight: 700;
    color: #e8850c;
}

.dh-top-name {
    font-size: 12pt;
    font-weight: 600;
    color: #333;
}

.dh-top-score {
    font-size: 12pt;
    color: #666;
}

/* User's own position */
.dh-user-position {
    margin-top: 16px;
    padding: 10px 16px;
    background: #fffbf5;
    border: 1px solid #f0e6d6;
    border-radius: 8px;
    display: inline-flex;
    align-items: center;
    gap: 10px;
}

.dh-user-position-label {
    font-size: 12pt;
    color: #555;
}

.dh-user-position-rank {
    font-size: 14pt;
    font-weight: 700;
    color: #e8850c;
}

.dh-user-position-score {
    font-size: 12pt;
    color: #666;
}

/* Contextual leaderboard (±2 around user) */
.dh-user-context {
    margin-top: 16px;
    border-radius: 8px;
    overflow: hidden;
    border: 1px solid #e8e8e8;
    text-align: left;
}

.dh-context-row {
    display: flex;
    align-items: center;
    padding: 10px 14px;
    border-bottom: 1px solid #f0f0f0;
    gap: 10px;
}

.dh-context-row:last-child {
    border-bottom: none;
}

.dh-context-row-me {
    background: #fff5e6;
    font-weight: 700;
    border-left: 3px solid #e8850c;
}

.dh-context-rank {
    color: #e8850c;
    font-weight: 700;
    font-size: 12pt;
    min-width: 36px;
}

.dh-context-name {
    flex: 1;
    font-size: 12pt;
    color: #333;
}

.dh-context-score {
    font-size: 12pt;
    color: #666;
    text-align: right;
}

/* Login CTA under leaderboard */
.dh-leaderboard-cta {
    margin-top: 12px;
    font-size: 12pt;
}

.dh-leaderboard-cta a {
    color: #e8850c;
    text-decoration: underline;
}

/* ── Help ── */
.dh-help {
    margin-bottom: 24px;
}

.dh-help-link {
    display: flex;
    flex-direction: column;
    gap: 2px;
    padding: 10px 14px;
    background: #fff;
    border: 1px solid #e8e8e8;
    border-radius: 6px;
    margin-bottom: 8px;
    color: #333;
    font-size: 12pt;
    text-decoration: none;
    transition: border-color .2s;
}

.dh-help-question {
    color: #333;
}

.dh-help-meta {
    font-size: 10pt;
    color: #666;
}

.dh-help-link:hover {
    border-color: #f5a623;
    text-decoration: none;
    color: #333;
}

/* ── Today's Crossword ── */
.dh-crossword {
    margin-bottom: 24px;
    text-align: center;
}

.dh-crossword-link {
    display: inline-flex;
    flex-direction: column;
    align-items: center;
    gap: 2px;
    padding: 12px 24px;
    background: #fff;
    border: 1px solid #e8e8e8;
    border-radius: 6px;
    text-decoration: none;
    transition: border-color .2s;
}

.dh-crossword-link:hover {
    border-color: #f5a623;
    text-decoration: none;
}

.dh-crossword-label {
    font-size: 10pt;
    color: #666;
    text-transform: uppercase;
    letter-spacing: 0.03em;
}

.dh-crossword-title {
    font-size: 13pt;
    font-weight: 600;
    color: #333;
}

/* ── Header dot (notification badge) ── */
.dh-header-dot {
    position: absolute;
    top: 2px;
    right: 0;
    width: 11px;
    height: 11px;
    background: #4caf50;
    border-radius: 50%;
    border: 2px solid #f8f9fa;
    display: block;
}

.dh-header-dot.dh-dot-hidden {
    display: none;
}

.dh-header-dot-desktop {
    top: 0;
    right: -2px;
}

/* ── Profile link from /idag ── */
.dh-profile-link {
    display: inline-block;
    margin-top: 12px;
    font-size: 12pt;
    color: #555;
}

.dh-profile-link:hover {
    color: #e8850c;
}

/* ── Responsive ── */
@media (max-width: 576px) {
    .dh-game-grid {
        grid-template-columns: 1fr;
    }

    .dh-stats {
        grid-template-columns: 1fr;
    }

    .dh-streak-count {
        font-size: 30pt;
    }

    .dh-fire {
        font-size: 22pt;
    }

    .dh-top-players {
        gap: 16px;
    }

    .dh-stats-zero-grid {
        gap: 8px;
    }
}
