/* ==========================================================================
   HOUSE DIARY — moment badges & "With" housemate chips
   (contestant journey timeline + single journey update page)
   ========================================================================== */

.bbt-moment-badge {
    display: inline-flex;
    align-items: center;
    gap: 4px;
    font-size: 12px;
    font-weight: 700;
    line-height: 1;
    padding: 5px 10px;
    border-radius: 99px;
    color: var(--m-color, #64748b);
    background: color-mix(in srgb, var(--m-color, #64748b) 10%, #fff);
    border: 1px solid color-mix(in srgb, var(--m-color, #64748b) 25%, #fff);
    white-space: nowrap;
}

.bbt-day-meta {
    flex-wrap: wrap;
    row-gap: 6px;
}

.bbt-with-people {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 6px;
    margin: -4px 0 14px;
}

.bbt-with-label {
    font-size: 12px;
    font-weight: 600;
    color: #64748b;
    text-transform: uppercase;
    letter-spacing: 0.04em;
    margin-right: 2px;
}

.bbt-with-chip {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 3px 10px 3px 3px;
    border-radius: 99px;
    background: #f1f5f9;
    border: 1px solid #e2e8f0;
    color: #0f172a !important;
    font-size: 13px;
    font-weight: 600;
    text-decoration: none !important;
    transition: background 0.15s, border-color 0.15s;
}

.bbt-with-chip:hover {
    background: #fff7ed;
    border-color: #fdba74;
}

.bbt-with-chip img {
    width: 24px;
    height: 24px;
    border-radius: 50%;
    object-fit: cover;
}

/* Single journey update page */
.bbt-pill-moment {
    color: #fff !important;
    background: var(--m-color, #64748b) !important;
    border-color: transparent !important;
}

.bbt-involved-contestant-card + .bbt-involved-contestant-card {
    margin-top: 16px;
}

/* ==========================================================================
   DAY-BY-DAY HOUSE TIMELINE (template-parts/season/day-by-day.php)
   ========================================================================== */

.bbt-dbd {
    --dbd-text: #0f172a;
    --dbd-muted: #64748b;
    --dbd-card: #ffffff;
    --dbd-card-2: #f8fafc;
    --dbd-border: #e2e8f0;
    --dbd-accent: #ea580c;
    --dbd-accent-soft: #fff7ed;
    --dbd-fade: #ffffff;
    color: var(--dbd-text);
    max-width: 1000px;
    margin: 0 auto;
}

.bbt-dbd--dark {
    --dbd-text: #f1f5f9;
    --dbd-muted: #94a3b8;
    --dbd-card: #111a2e;
    --dbd-card-2: #1a2438;
    --dbd-border: rgba(255, 255, 255, 0.1);
    --dbd-accent-soft: rgba(234, 88, 12, 0.15);
    --dbd-fade: #111a2e;
}

.bbt-dbd-stats {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    gap: 8px 22px;
    margin-bottom: 18px;
    font-size: 14px;
    color: var(--dbd-muted);
}
.bbt-dbd-stats strong { color: var(--dbd-text); }

/* Week pills */
.bbt-dbd-weeks {
    position: relative;
    display: flex;
    gap: 8px;
    overflow-x: auto;
    padding: 4px 2px 10px;
    scrollbar-width: none;
    -webkit-overflow-scrolling: touch;
}
.bbt-dbd-weeks::-webkit-scrollbar { display: none; }

.bbt-dbd-week-btn {
    flex: 0 0 auto;
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 8px 18px;
    border-radius: 99px;
    border: 1px solid var(--dbd-border);
    background: var(--dbd-card);
    color: var(--dbd-text);
    font-size: 14px;
    font-weight: 700;
    cursor: pointer;
    transition: background 0.15s, border-color 0.15s;
}
.bbt-dbd-week-btn:hover { border-color: var(--dbd-accent); }
.bbt-dbd-week-btn.is-active {
    background: linear-gradient(135deg, #ea580c, #dc2626);
    border-color: #ea580c;
    color: #fff;
    box-shadow: 0 4px 14px rgba(234, 88, 12, 0.35);
}
.bbt-dbd-count {
    min-width: 20px;
    padding: 1px 6px;
    border-radius: 99px;
    background: rgba(148, 163, 184, 0.25);
    font-size: 11px;
    text-align: center;
}
.bbt-dbd-week-btn.is-active .bbt-dbd-count { background: rgba(255, 255, 255, 0.25); }

/* Day tabs (7 per week) */
.bbt-dbd-daybar {
    position: relative;
    display: grid;
    grid-template-columns: repeat(7, minmax(0, 1fr));
    gap: 8px;
    margin: 6px 0 20px;
}
.bbt-dbd-daybar[hidden] { display: none; }

.bbt-dbd-day-btn {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 2px;
    padding: 10px 4px;
    border-radius: 12px;
    border: 1px solid var(--dbd-border);
    background: var(--dbd-card);
    color: var(--dbd-text);
    cursor: pointer;
    line-height: 1.2;
    transition: border-color 0.15s, background 0.15s, transform 0.15s;
}
.bbt-dbd-day-btn:hover:not([disabled]) { border-color: var(--dbd-accent); transform: translateY(-1px); }
.bbt-dbd-day-btn[disabled] { opacity: 0.45; cursor: default; }
.bbt-dbd-day-num { font-size: 14px; font-weight: 800; }
.bbt-dbd-day-date { font-size: 11px; color: var(--dbd-muted); }
.bbt-dbd-day-count { font-size: 10.5px; color: var(--dbd-muted); margin-top: 2px; }
.bbt-dbd-day-btn.has-moments .bbt-dbd-day-count { color: var(--dbd-accent); font-weight: 700; }
.bbt-dbd-day-btn.is-active {
    border-color: var(--dbd-accent);
    background: var(--dbd-accent-soft);
    box-shadow: inset 0 0 0 1px var(--dbd-accent);
}

/* Day segment */
.bbt-dbd-day[hidden] { display: none; }

.bbt-dbd-day-head {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 14px 16px;
    border: 1px solid var(--dbd-border);
    border-radius: 14px;
    background: var(--dbd-card-2);
    margin-bottom: 14px;
}
.bbt-dbd-day-title { flex: 1; text-align: center; min-width: 0; }
.bbt-dbd-day-title h3 { margin: 0; font-size: 20px; font-weight: 900; color: var(--dbd-text); }
.bbt-dbd-day-title h3 span { font-size: 14px; font-weight: 600; color: var(--dbd-muted); }
.bbt-dbd-day-title p { margin: 2px 0 0; font-size: 13px; color: var(--dbd-muted); }

.bbt-dbd-nav {
    flex: 0 0 38px;
    width: 38px;
    height: 38px;
    padding: 0 !important;
    border-radius: 50%;
    border: 1px solid var(--dbd-border);
    background: var(--dbd-card);
    color: var(--dbd-text);
    font-size: 22px;
    line-height: 1;
    cursor: pointer;
}
.bbt-dbd-nav:hover:not([disabled]) { border-color: var(--dbd-accent); color: var(--dbd-accent); }
.bbt-dbd-nav[disabled] { opacity: 0.35; cursor: default; }

.bbt-dbd-empty {
    text-align: center;
    padding: 34px 20px;
    border: 1px dashed var(--dbd-border);
    border-radius: 14px;
    color: var(--dbd-muted);
}
.bbt-dbd-empty span { font-size: 30px; }
.bbt-dbd-empty p { margin: 6px 0 0; }

.bbt-dbd-list { display: flex; flex-direction: column; gap: 14px; }

.bbt-dbd-entry {
    display: flex;
    gap: 16px;
    padding: 18px;
    border: 1px solid var(--dbd-border);
    border-radius: 14px;
    background: var(--dbd-card);
}
.bbt-dbd-thumb { flex: 0 0 180px; }
.bbt-dbd-thumb img { width: 100%; aspect-ratio: 4 / 3; object-fit: cover; border-radius: 10px; display: block; }
.bbt-dbd-entry-body { flex: 1; min-width: 0; }

.bbt-dbd-tags { display: flex; flex-wrap: wrap; gap: 6px; margin-bottom: 8px; }
.bbt-source-badge {
    display: inline-flex;
    align-items: center;
    gap: 4px;
    font-size: 12px;
    font-weight: 700;
    line-height: 1;
    padding: 5px 10px;
    border-radius: 99px;
    color: #475569;
    background: #f1f5f9;
    border: 1px solid #e2e8f0;
}
.bbt-source-badge.is-live { color: #b91c1c; background: #fef2f2; border-color: #fecaca; }

.bbt-dbd-entry-title { margin: 0 0 10px; font-size: 17px; font-weight: 800; line-height: 1.35; }
.bbt-dbd-entry-title a { color: var(--dbd-text) !important; text-decoration: none !important; }
.bbt-dbd-entry-title a:hover { color: var(--dbd-accent) !important; }
.bbt-dbd-entry .bbt-with-people { margin: 0 0 10px; }

.bbt-dbd-story { font-size: 15px; line-height: 1.65; color: var(--dbd-text); position: relative; }
.bbt-dbd-story p,
.bbt-dbd-story li { color: inherit; }
.bbt-dbd-story p { margin: 0 0 10px; }
.bbt-dbd-story > *:last-child { margin-bottom: 0; }
.bbt-dbd-story.is-clamped { max-height: 200px; overflow: hidden; }
.bbt-dbd-story.is-clamped::after {
    content: "";
    position: absolute;
    left: 0;
    right: 0;
    bottom: 0;
    height: 70px;
    background: linear-gradient(to bottom, transparent, var(--dbd-fade));
}
.bbt-dbd-more {
    margin-top: 6px;
    padding: 0;
    border: 0;
    background: none;
    color: var(--dbd-accent);
    font-weight: 700;
    font-size: 13.5px;
    cursor: pointer;
}
.bbt-dbd-more[hidden] { display: none; }

.bbt-dbd-entry-foot {
    display: flex;
    justify-content: space-between;
    gap: 10px;
    margin-top: 12px;
    padding-top: 10px;
    border-top: 1px solid var(--dbd-border);
    font-size: 13.5px;
}
.bbt-dbd-entry-foot a { color: var(--dbd-muted) !important; text-decoration: none !important; font-weight: 600; }
.bbt-dbd-entry-foot .bbt-dbd-open { color: var(--dbd-accent) !important; }

/* Dark theme chips & badges */
.bbt-dbd--dark .bbt-with-chip { background: rgba(255, 255, 255, 0.08); border-color: rgba(255, 255, 255, 0.12); color: #f1f5f9 !important; }
.bbt-dbd--dark .bbt-with-chip:hover { background: rgba(234, 88, 12, 0.2); border-color: #ea580c; }
.bbt-dbd--dark .bbt-source-badge { color: #cbd5e1; background: rgba(255, 255, 255, 0.08); border-color: rgba(255, 255, 255, 0.12); }
.bbt-dbd--dark .bbt-source-badge.is-live { color: #fca5a5; background: rgba(220, 38, 38, 0.15); border-color: rgba(220, 38, 38, 0.35); }
.bbt-dbd--dark .bbt-moment-badge {
    background: color-mix(in srgb, var(--m-color, #64748b) 18%, transparent);
    border-color: color-mix(in srgb, var(--m-color, #64748b) 40%, transparent);
    color: color-mix(in srgb, var(--m-color, #64748b) 45%, #fff);
}

/* Source badge on contestant journey cards */
.bbt-day-meta .bbt-source-badge { padding: 4px 9px; font-size: 11px; }

@media (max-width: 720px) {
    .bbt-dbd-daybar {
        display: flex;
        overflow-x: auto;
        scrollbar-width: none;
        padding-bottom: 4px;
    }
    .bbt-dbd-daybar::-webkit-scrollbar { display: none; }
    .bbt-dbd-day-btn { flex: 0 0 86px; }
    .bbt-dbd-entry { flex-direction: column; padding: 14px; }
    .bbt-dbd-thumb { flex: none; }
    .bbt-dbd-day-head { padding: 10px; }
    .bbt-dbd-day-title h3 { font-size: 17px; }
}
