/* ═══════════════════════════════════════════════════════════════════════════
   Saved Blogs Page  (stylingSavedBlogs.css)
   Accent: #f59e0b (amber) — matches Scribe
   ═══════════════════════════════════════════════════════════════════════════ */

/* ── Page shell ─────────────────────────────────────────────────────────── */
.svb-page {
    background: #0d0800;
    min-height: 100vh;
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', 'Inter', 'Helvetica Neue', Arial, sans-serif;
    margin-bottom: -96px;
}

/* ── Header ─────────────────────────────────────────────────────────────── */
.svb-header {
    background: linear-gradient(140deg, #1a0f00 0%, #261700 55%, #1c1200 100%);
    border-bottom: 1px solid rgba(245, 158, 11, 0.18);
    position: relative;
    height: auto;
    margin: -60px 0 -110px 0;
}

.svb-header::before {
    content: '';
    position: absolute;
    top: -80px; right: -120px;
    width: 500px; height: 500px;
    background: radial-gradient(circle, rgba(245, 158, 11, 0.09) 0%, transparent 65%);
    pointer-events: none;
}

/* Global .container override — cancel 70vh min-height + 96px margin-top inside header */
.svb-header .container {
    min-height: 0;
    margin-top: 0;
    padding-top: 48px;
    padding-bottom: 40px;
}

.svb-badge {
    display: inline-flex;
    background: rgba(245, 158, 11, 0.15);
    color: #fbbf24;
    border: 1px solid rgba(245, 158, 11, 0.30);
    border-radius: 999px;
    font-size: 0.68rem;
    font-weight: 700;
    letter-spacing: 0.12em;
    text-transform: uppercase;
    padding: 3px 12px;
    margin-bottom: 10px;
}

.svb-header__body {
    display: flex;
    align-items: flex-end;
    justify-content: space-between;
    flex-wrap: wrap;
    gap: 20px;
}

.svb-header__title {
    font-size: 2rem;
    font-weight: 800;
    color: #ffffff;
    margin: 0 0 8px;
    letter-spacing: -0.02em;
}

.svb-header__subtitle {
    font-size: 0.92rem;
    color: rgba(255, 255, 255, 0.50);
    margin: 0;
    max-width: 560px;
    line-height: 1.6;
}

.svb-header__count { flex-shrink: 0; }

.svb-count-chip {
    background: rgba(245, 158, 11, 0.12);
    border: 1px solid rgba(245, 158, 11, 0.22);
    color: #fbbf24;
    border-radius: 999px;
    font-size: 0.78rem;
    font-weight: 600;
    padding: 5px 14px;
}

/* ── Body ────────────────────────────────────────────────────────────────── */
.svb-body {
    padding-top: 120px;
    padding-bottom: 120px;
}

/* ── Empty / loading ─────────────────────────────────────────────────────── */
.svb-empty {
    text-align: center;
    padding: 80px 20px;
}
.svb-empty__icon  { font-size: 2.5rem; margin: 0 0 16px; }
.svb-empty__title { font-size: 1.25rem; font-weight: 700; color: #ffffff; margin: 0 0 8px; }
.svb-empty__sub   { font-size: 0.88rem; color: rgba(255,255,255,0.42); margin: 0 0 24px; }

.svb-empty-btn {
    background: linear-gradient(135deg, #d97706 0%, #b45309 100%);
    color: #fff;
    border: none;
    border-radius: 10px;
    font-size: 0.90rem;
    font-weight: 700;
    padding: 11px 26px;
    cursor: pointer;
    transition: opacity 0.18s;
}
.svb-empty-btn:hover { opacity: 0.88; }

.svb-loading {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 14px;
    padding: 80px 20px;
    color: rgba(255,255,255,0.38);
    font-size: 0.88rem;
}
.svb-loading-spinner {
    width: 28px; height: 28px;
    border: 2.5px solid rgba(245,158,11,0.20);
    border-top-color: #f59e0b;
    border-radius: 50%;
    animation: svb-spin 0.75s linear infinite;
}
@keyframes svb-spin { to { transform: rotate(360deg); } }

/* ── Blog list ───────────────────────────────────────────────────────────── */
.svb-list {
    display: flex;
    flex-direction: column;
    gap: 10px;
    max-width: 900px;
}

.svb-card {
    background: rgba(255,255,255,0.035);
    border: 1px solid rgba(255,255,255,0.08);
    border-radius: 14px;
    overflow: hidden;
    transition: border-color 0.18s;
}
.svb-card:hover { border-color: rgba(245,158,11,0.20); }

.svb-card__head {
    display: flex;
    align-items: center;
    gap: 14px;
    padding: 16px 20px;
    cursor: pointer;
    user-select: none;
    min-height: 64px;
}

.svb-card__num {
    font-size: 0.68rem;
    font-weight: 800;
    color: rgba(245,158,11,0.52);
    letter-spacing: 0.06em;
    flex-shrink: 0;
    min-width: 20px;
}

.svb-card__info {
    flex: 1;
    min-width: 0;
}

.svb-card__title {
    font-size: 0.93rem;
    font-weight: 600;
    color: #ffffff;
    margin: 0 0 4px;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.svb-card__meta {
    font-size: 0.74rem;
    color: rgba(255,255,255,0.38);
    margin: 0;
}

/* Action buttons */
.svb-card__btns {
    display: flex;
    gap: 7px;
    flex-shrink: 0;
}

.svb-btn {
    background: rgba(255,255,255,0.07);
    border: 1px solid rgba(255,255,255,0.11);
    color: rgba(255,255,255,0.62);
    border-radius: 8px;
    font-size: 0.77rem;
    font-weight: 600;
    padding: 5px 12px;
    cursor: pointer;
    transition: all 0.15s;
    white-space: nowrap;
}
.svb-btn:hover {
    background: rgba(245,158,11,0.12);
    border-color: rgba(245,158,11,0.28);
    color: #fbbf24;
}

.svb-btn--copied {
    background: rgba(34,197,94,0.12);
    border-color: rgba(34,197,94,0.28);
    color: #4ade80;
}

.svb-btn--ghost {
    background: rgba(255,255,255,0.04);
    border-color: rgba(255,255,255,0.08);
    color: rgba(255,255,255,0.45);
}
.svb-btn--ghost:hover {
    background: rgba(245,158,11,0.10);
    border-color: rgba(245,158,11,0.25);
    color: #fbbf24;
}

.svb-btn--remove {
    background: rgba(255,255,255,0.04);
    border-color: rgba(255,255,255,0.08);
    color: rgba(255,255,255,0.32);
    padding: 5px 9px;
}
.svb-btn--remove:hover {
    background: rgba(239,68,68,0.10);
    border-color: rgba(239,68,68,0.22);
    color: #fca5a5;
}
.svb-btn--remove:disabled { opacity: 0.45; cursor: not-allowed; }

.svb-chevron {
    font-size: 1rem;
    color: rgba(255,255,255,0.28);
    transition: transform 0.2s;
    flex-shrink: 0;
    line-height: 1;
}
.svb-chevron.open { transform: rotate(180deg); }

/* Expanded body */
.svb-card__body {
    border-top: 1px solid rgba(255,255,255,0.07);
    padding: 20px 24px 26px;
}

.svb-meta-row {
    display: flex;
    align-items: flex-start;
    gap: 10px;
    margin-bottom: 18px;
    padding: 10px 14px;
    background: rgba(245,158,11,0.07);
    border: 1px solid rgba(245,158,11,0.16);
    border-radius: 8px;
}
.svb-meta-label {
    font-size: 0.65rem;
    font-weight: 700;
    letter-spacing: 0.11em;
    text-transform: uppercase;
    color: #f59e0b;
    white-space: nowrap;
    padding-top: 2px;
    flex-shrink: 0;
}
.svb-meta-text {
    font-size: 0.81rem;
    color: rgba(255,255,255,0.62);
    margin: 0;
    line-height: 1.55;
}

.svb-content {
    white-space: pre-wrap;
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', 'Inter', 'Helvetica Neue', Arial, sans-serif;
    font-size: 0.875rem;
    color: rgba(255,255,255,0.80);
    line-height: 1.80;
    margin: 0;
    word-break: break-word;
    overflow-wrap: break-word;
}

/* ── Scribe-page pin button state ────────────────────────────────────────── */
.scribe-pin-btn--pinned {
    background: rgba(245,158,11,0.14) !important;
    border-color: rgba(245,158,11,0.30) !important;
    color: #fbbf24 !important;
}

/* ── Light theme ─────────────────────────────────────────────────────────── */
html[data-theme="light"] .svb-page       { background: #fffbeb; }
html[data-theme="light"] .svb-header     { background: linear-gradient(140deg,#fef3c7 0%,#fde68a 55%,#fef3c7 100%); border-bottom-color: rgba(180,83,9,0.18); }
html[data-theme="light"] .svb-header__title    { color: #1c0f00; }
html[data-theme="light"] .svb-header__subtitle { color: rgba(28,15,0,0.55); }
html[data-theme="light"] .svb-badge      { background: rgba(245,158,11,0.14); color: #92400e; border-color: rgba(245,158,11,0.32); }
html[data-theme="light"] .svb-count-chip { background: rgba(245,158,11,0.12); color: #92400e; border-color: rgba(245,158,11,0.25); }
html[data-theme="light"] .svb-card       { background: #fff; border-color: rgba(0,0,0,0.09); }
html[data-theme="light"] .svb-card__title{ color: #1c0f00; }
html[data-theme="light"] .svb-card__meta { color: rgba(0,0,0,0.42); }
html[data-theme="light"] .svb-card__num  { color: rgba(180,83,9,0.55); }
html[data-theme="light"] .svb-card__body { border-top-color: rgba(0,0,0,0.07); }
html[data-theme="light"] .svb-content    { color: rgba(0,0,0,0.80); }
html[data-theme="light"] .svb-btn        { background: #f5f5f5; border-color: rgba(0,0,0,0.11); color: rgba(0,0,0,0.60); }
html[data-theme="light"] .svb-chevron    { color: rgba(0,0,0,0.28); }
html[data-theme="light"] .svb-meta-row   { background: rgba(245,158,11,0.08); border-color: rgba(245,158,11,0.20); }
html[data-theme="light"] .svb-meta-text  { color: rgba(0,0,0,0.62); }
html[data-theme="light"] .svb-empty__title { color: #1c0f00; }
html[data-theme="light"] .svb-loading    { color: rgba(0,0,0,0.38); }

/* ── Inline unpin confirmation ───────────────────────────────────────────── */
.svb-confirm {
    display: flex;
    align-items: center;
    gap: 6px;
    animation: svb-confirm-in 0.16s ease;
}

@keyframes svb-confirm-in {
    from { opacity: 0; transform: translateX(6px); }
    to   { opacity: 1; transform: translateX(0);   }
}

.svb-confirm__label {
    font-size: 0.76rem;
    font-weight: 600;
    color: rgba(255,255,255,0.50);
    white-space: nowrap;
}

.svb-confirm__yes {
    background: rgba(239,68,68,0.12);
    border: 1px solid rgba(239,68,68,0.28);
    color: #fca5a5;
    border-radius: 7px;
    font-size: 0.74rem;
    font-weight: 700;
    padding: 4px 11px;
    cursor: pointer;
    transition: all 0.15s;
    white-space: nowrap;
}
.svb-confirm__yes:hover {
    background: rgba(239,68,68,0.22);
    border-color: rgba(239,68,68,0.48);
    color: #f87171;
}

.svb-confirm__no {
    background: transparent;
    border: 1px solid rgba(255,255,255,0.10);
    color: rgba(255,255,255,0.38);
    border-radius: 7px;
    font-size: 0.74rem;
    font-weight: 600;
    padding: 4px 9px;
    cursor: pointer;
    transition: all 0.15s;
    white-space: nowrap;
}
.svb-confirm__no:hover {
    border-color: rgba(255,255,255,0.22);
    color: rgba(255,255,255,0.65);
}

html[data-theme="light"] .svb-confirm__label { color: rgba(0,0,0,0.45); }
html[data-theme="light"] .svb-confirm__yes   { background: rgba(220,38,38,0.07); border-color: rgba(220,38,38,0.22); color: #b91c1c; }
html[data-theme="light"] .svb-confirm__yes:hover { background: rgba(220,38,38,0.14); border-color: rgba(220,38,38,0.40); }
html[data-theme="light"] .svb-confirm__no    { border-color: rgba(0,0,0,0.10); color: rgba(0,0,0,0.38); }
html[data-theme="light"] .svb-confirm__no:hover { border-color: rgba(0,0,0,0.22); color: rgba(0,0,0,0.62); }
