/*
 * Header & footer situs publik (includes/SiteChromeHelper.php).
 * CSS polos ber-prefix `sc-` supaya sama persis di halaman Tailwind
 * maupun Bootstrap -- tidak bergantung ke salah satunya.
 */
:root {
    --sc-paper: #f7f4ee;
    --sc-ink: #1a1714;
    --sc-muted: #6b645c;
    --sc-line: #e4ddd2;
    --sc-brand: #be123c;
    --sc-brand-dark: #9f1239;
    --sc-sans: 'Plus Jakarta Sans', system-ui, -apple-system, 'Segoe UI', sans-serif;
    --sc-serif: 'Fraunces', Georgia, serif;
}

.sc-header, .sc-footer { font-family: var(--sc-sans); color: var(--sc-ink); line-height: 1.5; }
.sc-header *, .sc-footer * { box-sizing: border-box; }
.sc-header a, .sc-footer a { color: inherit; text-decoration: none; }
.sc-header ul, .sc-footer ul { list-style: none; margin: 0; padding: 0; }
.sc-header p, .sc-footer p { margin: 0; }
.sc-header img, .sc-footer img { display: block; }
.sc-header button { font: inherit; color: inherit; background: none; border: 0; cursor: pointer; padding: 0; }

.sc-wrap { max-width: 80rem; margin: 0 auto; padding: 0 1rem; }
@media (min-width: 640px) { .sc-wrap { padding: 0 1.5rem; } }
@media (min-width: 1024px) { .sc-wrap { padding: 0 2rem; } }

/* ---------- Header ---------- */
.sc-header { position: -webkit-sticky; position: sticky; top: 0; z-index: 1030; background: rgba(247, 244, 238, .92); -webkit-backdrop-filter: blur(10px); backdrop-filter: blur(10px); border-bottom: 1px solid var(--sc-line); }
.sc-bar { display: flex; align-items: center; justify-content: space-between; height: 72px; }
.sc-logo img { height: 36px; width: auto; }
@media (min-width: 640px) { .sc-logo img { height: 40px; } }

.sc-nav { display: none; align-items: center; font-size: .875rem; font-weight: 600; }
@media (min-width: 1024px) { .sc-nav { display: flex; } }
.sc-header .sc-nav-link { display: inline-flex; align-items: center; padding: .5rem .75rem; color: rgba(26, 23, 20, .8); transition: color .15s; }
.sc-nav-link:hover, .sc-nav-link:focus-visible, .sc-nav-link.is-active { color: var(--sc-brand); }
.sc-chev { width: 10px; height: 10px; margin-left: .35rem; }
.sc-nav-group { position: relative; }
.sc-nav-menu { display: none; position: absolute; left: 0; top: 100%; padding-top: .5rem; width: 15rem; z-index: 50; }
.sc-nav-menu.is-right { left: auto; right: 0; }
.sc-nav-group:hover .sc-nav-menu, .sc-nav-group:focus-within .sc-nav-menu { display: block; }
.sc-nav-panel { background: #fff; border: 1px solid var(--sc-line); border-radius: .5rem; box-shadow: 0 10px 30px -12px rgba(26, 23, 20, .25); padding: .5rem 0; }
.sc-nav-panel a { display: block; padding: .5rem 1rem; font-size: .875rem; font-weight: 500; }
.sc-nav-panel a:hover { background: var(--sc-paper); color: var(--sc-brand); }
.sc-nav-panel .sc-danger { color: var(--sc-brand); font-weight: 600; border-top: 1px solid var(--sc-line); margin-top: .25rem; }

.sc-actions { display: flex; align-items: center; }
.sc-actions > * + * { margin-left: .5rem; }
.sc-desktop-only { display: none !important; }
@media (min-width: 1024px) { .sc-desktop-only { display: inline-flex !important; } }
.sc-sm-up { display: none !important; }
@media (min-width: 640px) { .sc-sm-up { display: inline-flex !important; } }

.sc-btn { display: inline-flex; align-items: center; justify-content: center; background: var(--sc-ink); color: var(--sc-paper) !important; font-size: .875rem; font-weight: 600; padding: .6rem 1rem; border-radius: 999px; transition: background-color .15s; white-space: nowrap; }
.sc-btn:hover { background: var(--sc-brand); }
.sc-icon-btn { position: relative; display: inline-flex; align-items: center; justify-content: center; width: 40px; height: 40px; border-radius: 999px; border: 1px solid var(--sc-line); transition: background-color .15s; }
.sc-icon-btn:hover { background: #fff; }
.sc-icon-btn svg { width: 18px; height: 18px; }
.sc-badge { position: absolute; top: -4px; right: -4px; min-width: 18px; height: 18px; padding: 0 5px; border-radius: 999px; background: var(--sc-brand); color: #fff; font-size: .68rem; font-weight: 700; line-height: 18px; text-align: center; }
.sc-text-link { font-size: .875rem; font-weight: 600; padding: .5rem .5rem; }
.sc-text-link:hover { color: var(--sc-brand); }

.sc-lang { display: inline-flex; border: 1px solid var(--sc-line); border-radius: 999px; padding: 2px; font-size: .75rem; font-weight: 700; }
.sc-lang a { padding: .3rem .6rem; border-radius: 999px; color: var(--sc-muted); }
.sc-lang a.is-active { background: var(--sc-ink); color: var(--sc-paper); }

.sc-burger { display: inline-flex; }
@media (min-width: 1024px) { .sc-burger { display: none !important; } }

.sc-mobile { border-top: 1px solid var(--sc-line); background: var(--sc-paper); }
.sc-mobile[hidden] { display: none; }
@media (min-width: 1024px) { .sc-mobile { display: none !important; } }
.sc-mobile-inner { max-height: 75vh; overflow-y: auto; padding-top: .5rem; padding-bottom: 1rem; font-size: .9rem; }
.sc-mobile-inner > a, .sc-mobile summary { display: flex; justify-content: space-between; align-items: center; padding: .8rem 0; font-weight: 600; border-bottom: 1px solid var(--sc-line); }
.sc-mobile summary { cursor: pointer; list-style: none; }
.sc-mobile summary::-webkit-details-marker { display: none; }
.sc-mobile details[open] .sc-chev { transform: rotate(180deg); }
.sc-mobile details > div { padding: .25rem 0 .5rem 1rem; border-bottom: 1px solid var(--sc-line); }
.sc-mobile details > div a { display: block; padding: .5rem 0; color: var(--sc-muted); }

/* ---------- Footer ---------- */
.sc-footer { background: var(--sc-ink); color: rgba(247, 244, 238, .7); font-size: .875rem; margin-top: 0; }
.sc-footer-grid { display: grid; grid-template-columns: minmax(0, 1fr); grid-gap: 2.5rem; padding-top: 3.5rem; padding-bottom: 3.5rem; }
@media (min-width: 640px) { .sc-footer-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
@media (min-width: 1024px) { .sc-footer-grid { grid-template-columns: repeat(4, minmax(0, 1fr)); } }
.sc-footer-brand { font-family: var(--sc-serif); font-size: 1.5rem; font-weight: 600; color: var(--sc-paper); margin-bottom: .75rem !important; }
.sc-footer h3, .site-theme .sc-footer h3 { font-family: var(--sc-sans); font-size: .875rem; font-weight: 600; color: var(--sc-paper); margin: 0 0 .75rem; }
.sc-footer li + li { margin-top: .5rem; }
.sc-footer a:hover { color: #fff; }
.sc-footer-bottom { border-top: 1px solid rgba(255, 255, 255, .1); }
.sc-footer-bottom .sc-wrap { display: flex; flex-direction: column; padding-top: 1.25rem; padding-bottom: 1.25rem; font-size: .75rem; }
.sc-footer-bottom .sc-wrap > * + * { margin-top: .5rem; }
@media (min-width: 640px) {
    .sc-footer-bottom .sc-wrap { flex-direction: row; justify-content: space-between; }
    .sc-footer-bottom .sc-wrap > * + * { margin-top: 0; }
}
.sc-dot { margin: 0 .5rem; }

/* ---------- Sampul tipografis (buku tanpa gambar sampul) ---------- */
.sc-type-cover { position: relative; display: flex !important; flex-direction: column; justify-content: space-between !important; align-items: stretch !important; padding: 1.1rem 1rem 1rem 1.25rem; color: #f7f4ee !important; overflow: hidden; text-align: left; }
.sc-type-cover::before { content: ""; position: absolute; top: 0; bottom: 0; left: 8px; width: 2px; background: rgba(255, 255, 255, .18); }
.sc-type-cover-title { font-family: var(--sc-serif); font-weight: 600; font-size: 1.05rem; line-height: 1.15; overflow-wrap: break-word; display: -webkit-box; -webkit-line-clamp: 5; -webkit-box-orient: vertical; overflow: hidden; }
.sc-type-cover-author { font-family: var(--sc-sans); font-size: .62rem; letter-spacing: .08em; text-transform: uppercase; opacity: .75; }

/* ---------- Mode ringkas (halaman form/transaksi) ---------- */
.sc-back { display: inline-flex; align-items: center; font-size: .875rem; font-weight: 600; padding: .5rem .9rem .5rem .7rem; border: 1px solid var(--sc-line); border-radius: 999px; transition: border-color .15s, background-color .15s; }
.sc-back:hover { border-color: var(--sc-ink); background: #fff; }
.sc-back svg { width: 14px; height: 14px; margin-right: .35rem; }
@media (max-width: 479.98px) { .sc-back span { max-width: 9.5rem; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; } }
.sc-footer-min { margin-top: 3rem; }
.sc-footer-min .sc-footer-bottom { border-top: 0; }

/* Bilah sekali-tampil: bahasa tampilan diambil dari browser (renderUiLocaleAutoNotice). */
.sc-locale-notice { display: flex; flex-wrap: wrap; align-items: center; justify-content: center; padding: .55rem 1rem; font-family: 'Plus Jakarta Sans', system-ui, sans-serif; font-size: .85rem; color: #3d3833; background: #efe9df; border-bottom: 1px solid #e4ddd2; text-align: center; }
.sc-locale-notice > * { margin: .15rem .5rem; }
.sc-locale-notice a { font-weight: 700; text-decoration: none; }
.sc-locale-notice .sc-locale-notice-switch { color: #9f1239; }
.sc-locale-notice .sc-locale-notice-keep { color: #1a1714; border: 1px solid #d6cdbf; border-radius: 999px; padding: .1rem .7rem; }
.bt-dark-mode .sc-locale-notice { background: #292524; color: #e7e5e4; border-color: #44403c; }
.bt-dark-mode .sc-locale-notice .sc-locale-notice-keep { color: #f5f5f4; border-color: #57534e; }
.bt-lang-offer { font-size: .88rem; color: #3d3833; margin: .25rem 0 1rem; }
.bt-lang-offer .bi { color: #9f1239; margin-right: .3rem; }
.bt-lang-offer a { font-weight: 700; color: #9f1239; text-decoration: none; margin-left: .25rem; }
.bt-dark-mode .bt-lang-offer { color: #d6d3d1; }
