/* ===========================
   CUSTOM TOP HEADER (WHITE)
   =========================== */
#custom-top-header {
    display: flex !important;
    justify-content: space-between !important;
    align-items: center !important;

    position: fixed !important;
    top: 0 !important;
    left: 0 !important;
    right: 0 !important;
    height: 64px !important;
    z-index: 99999 !important;

    background-color: #ffffff !important; /* putih seperti Gambar 2 */
    color: #111827 !important;
    padding: 0 28px !important;
    border-bottom: 1px solid rgba(16,24,40,0.06) !important;
    box-shadow: 0 6px 18px rgba(15,23,42,0.06) !important;
}

/* kiri: logo + title */
.header-left {
    display: flex !important;
    align-items: center !important;
    gap: 14px !important;
}

.header-logo {
    height: 36px !important;
    width: auto !important;
    display: block !important;
    object-fit: contain !important;
}

.header-title {
    font-size: 15px !important;
    font-weight: 700 !important;
    color: #0f172a !important;
    letter-spacing: 0.2px !important;
}

/* kanan: search pill */
.header-right {
    display: flex !important;
    align-items: center !important;
    gap: 12px !important;
}

/* Search pill (rounded) */
.search-wrapper {
    display: flex !important;
    align-items: center !important;
    gap: 10px !important;

    background: #ffffff !important;
    border: 1px solid rgba(15,23,42,0.08) !important;
    border-radius: 999px !important;
    padding: 8px 14px !important;
    min-width: 300px !important;
    max-width: 460px !important;
    height: 40px !important;
    box-shadow: 0 2px 6px rgba(15,23,42,0.03) !important;
    cursor: text !important;
}

/* search icon */
.search-wrapper i {
    font-size: 14px !important;
    color: rgba(15,23,42,0.45) !important;
}

/* input */
.search-wrapper input {
    background: transparent !important;
    border: none !important;
    outline: none !important;
    color: #0f172a !important;
    font-size: 14px !important;
    width: 100% !important;
    height: 100% !important;
    padding: 0 !important;
}

/* placeholder color */
.search-wrapper input::placeholder {
    color: rgba(15,23,42,0.40) !important;
}

/* Ctrl K badge on the right inside header */
.kbd-badge {
    display: inline-flex !important;
    align-items: center !important;
    justify-content: center !important;
    font-size: 12px !important;
    font-weight: 600 !important;
    color: #374151 !important;
    background: #f3f4f6 !important;
    border: 1px solid rgba(15,23,42,0.06) !important;
    border-radius: 6px !important;
    padding: 4px 8px !important;
    margin-left: 8px !important;
    white-space: nowrap !important;
}

/* sembunyikan header default GitBook/HonKit yang mengganggu */
.book-header {
    display: none !important;
}

/* geser isi buku supaya tidak tertutup header */
.book-summary, .book-body {
    top: 64px !important; /* sama dengan tinggi header */
    height: calc(100vh - 64px) !important;
}

/* sidebar */
.book-summary {
    position: fixed !important;
    left: 0 !important;
    width: 280px !important;
    border-right: 1px solid rgba(15,23,42,0.04) !important;
    background: #ffffff !important;
    overflow-y: auto !important;
}

/* konten utama */
.book-body {
    position: fixed !important;
    left: 280px !important;
    right: 0 !important;
    overflow-y: auto !important;
    background: #ffffff !important;
}

/* responsive kecil: tumpuk header layout */
@media (max-width: 860px) {
    .search-wrapper { min-width: 180px !important; max-width: 280px !important; }
    .header-title { display: none !important; }
    .book-summary { width: 220px !important; left: 0 !important; }
    .book-body { left: 220px !important; }
}

/* ===========================
   RESPONSIVE YOUTUBE IFRAME
   =========================== */
iframe[src*="youtube.com"] {
    width: 100% !important;
    max-width: 100% !important;
    height: auto !important;
    aspect-ratio: 16 / 9 !important;
    position: relative !important;
    z-index: 50 !important;
    pointer-events: auto !important;
}
