/* ======================
   SINGLE POST — MAS
   Load khusus: is_singular('post')
   ====================== */

/* --- Sidebar --- */
body.single-post .inside-right-sidebar ul.wp-block-categories-list {
    display: flex;
    flex-direction: column;
    row-gap: 0.3em;
    list-style: none;
    margin-left: 0.1em;
    margin-bottom: 0;
}

body.single-post .inside-right-sidebar ul.wp-block-categories-list li a {
    color: var(--contrast);
}

body.single-post .inside-right-sidebar ul.wp-block-categories-list li a:hover {
    color: var(--base);
}

/* --- Sidebar Toggle Button --- */
body.single-post #sidebar-toggle {
    position: fixed;
    top: 50%;
    right: 16px;
    transform: translateY(-50%) scale(1);
    z-index: 9999;
    background: var(--mas-blue);
    color: #fff;
    border: none;
    border-radius: 10px;
    padding: 8px 10px;
    width: 84px;
    font-size: 13px;
    line-height: 1.2;
    text-align: center;
    box-shadow: 0 6px 18px rgba(0,74,173,0.08);
    opacity: 0;
    pointer-events: none;
    transition: opacity .25s ease, transform .25s ease, background-color .25s ease;
}

body.single-post #sidebar-toggle.show {
    opacity: 1;
    pointer-events: auto;
    transform: translateY(-50%) scale(1);
}

body.single-post #sidebar-toggle:hover {
    background: var(--mas-orange-dark);
    transform: translateY(-50%) scale(1.05);
}

body.single-post #right-sidebar.closed {
    display: none !important;
}

/* --- Sidebar Animation --- */
body.single-post .sidebar.is-right-sidebar {
    opacity: 0;
    transform: translateX(10px);
    transition: opacity 0.4s ease, transform 0.4s ease;
}

body.single-post:not(.sidebar-closed) .sidebar.is-right-sidebar {
    opacity: 1;
    transform: translateX(0);
}

/* --- Content Width saat sidebar ditutup --- */
body.single-post.sidebar-closed #primary,
body.single-post.sidebar-closed .content-area {
    width: 100% !important;
    max-width: 1360px !important;
    margin: 0 auto;
    padding: 0 10px;
    box-sizing: border-box;
    flex: 0 0 100% !important;
}

body.single-post:not(.sidebar-closed) #primary,
body.single-post:not(.sidebar-closed) .content-area {
    padding: 0 20px;
    box-sizing: border-box;
}

body.single-post #primary,
body.single-post .content-area {
    transition: all 0.4s ease;
}

/* --- Responsive --- */
@media (max-width: 768px) {
    body.single-post .sidebar.is-right-sidebar { margin-top: 60px; }
    body.single-post #sidebar-toggle           { display: none !important; }
    body.single-post #primary,
    body.single-post .content-area             { padding: 0 16px !important; box-sizing: border-box; }
}
