/* Panel Boczny Genealogia */

@import url('https://fonts.googleapis.com/css2?family=Cinzel:wght@400;600;700&family=Lora:ital,wght@0,400;0,600;1,400&display=swap');

/* === SIDEBAR CONTAINER === */
.pbg-sidebar-2b7f9eb8 {
    position: fixed;
    top: 0;
    right: 0;
    z-index: 99999;
    display: flex;
    flex-direction: column;
    align-items: flex-end;
    pointer-events: none;
}

/* === TAB TRIGGER (always visible) === */
.pbg-tab-trigger-2b7f9eb8 {
    pointer-events: all;
    position: fixed;
    top: 50%;
    right: 0;
    transform: translateY(-50%) rotate(-90deg) translateX(50%);
    transform-origin: right center;
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 10px 24px;
    background: linear-gradient(135deg, #8B0000 0%, #B22222 50%, #8B0000 100%);
    color: #f5e6c8;
    font-family: 'Cinzel', serif;
    font-size: 14px;
    font-weight: 600;
    letter-spacing: 2px;
    text-transform: uppercase;
    border: 2px solid #d4a843;
    border-right: none;
    border-radius: 8px 8px 0 0;
    cursor: pointer;
    box-shadow: -2px -2px 10px rgba(0, 0, 0, 0.5), inset 0 1px 0 rgba(255, 215, 0, 0.2);
    transition: all 0.3s ease;
    white-space: nowrap;
    z-index: 100000;
}

.pbg-tab-trigger-2b7f9eb8:hover {
    background: linear-gradient(135deg, #a00000 0%, #cc2222 50%, #a00000 100%);
    box-shadow: -2px -2px 15px rgba(0, 0, 0, 0.6), inset 0 1px 0 rgba(255, 215, 0, 0.3), 0 0 20px rgba(178, 34, 34, 0.4);
    padding-right: 30px;
}

.pbg-tab-label-2b7f9eb8 {
    text-shadow: 1px 1px 2px rgba(0, 0, 0, 0.5);
}

.pbg-tab-arrow-2b7f9eb8 {
    font-size: 10px;
    transition: transform 0.3s ease;
    display: inline-block;
}

.pbg-sidebar-2b7f9eb8.pbg-open .pbg-tab-arrow-2b7f9eb8 {
    transform: rotate(180deg);
}

/* === PANEL (slide-in from right) === */
.pbg-panel-2b7f9eb8 {
    pointer-events: all;
    position: fixed;
    top: 0;
    right: -380px;
    width: 360px;
    height: 100vh;
    overflow-y: auto;
    display: flex;
    flex-direction: column;
    transition: right 0.45s cubic-bezier(0.25, 0.46, 0.45, 0.94);
    z-index: 99999;

    /* Parchment / old paper look */
    background:
        linear-gradient(180deg,
            #d4a843 0px, #d4a843 4px,
            transparent 4px, transparent 100%
        ),
        linear-gradient(0deg,
            #d4a843 0px, #d4a843 4px,
            transparent 4px, transparent 100%
        ),
        repeating-linear-gradient(
            180deg,
            rgba(139, 90, 43, 0.06) 0px,
            rgba(139, 90, 43, 0.06) 1px,
            transparent 1px,
            transparent 30px
        ),
        linear-gradient(135deg,
            #f5e6c8 0%,
            #e8d5a3 25%,
            #f0deb5 50%,
            #e2c98a 75%,
            #f5e6c8 100%
        );
    background-color: #f0deb5;
    border-left: 4px solid #d4a843;
    box-shadow: -5px 0 30px rgba(0, 0, 0, 0.4), inset 2px 0 10px rgba(139, 90, 43, 0.15);
}

.pbg-sidebar-2b7f9eb8.pbg-open .pbg-panel-2b7f9eb8 {
    right: 0;
}

/* === PANEL HEADER === */
.pbg-panel-header-2b7f9eb8 {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 20px 24px 16px;
    border-bottom: 2px solid #d4a843;
    background: linear-gradient(180deg, rgba(139, 90, 43, 0.12) 0%, transparent 100%);
}

.pbg-panel-title-2b7f9eb8 {
    font-family: 'Cinzel', serif;
    font-size: 18px;
    font-weight: 700;
    color: #4a2c0a;
    letter-spacing: 1.5px;
    text-transform: uppercase;
    text-shadow: 1px 1px 0 rgba(255, 255, 255, 0.4);
}

.pbg-close-btn-2b7f9eb8 {
    background: linear-gradient(135deg, #8B0000, #B22222);
    color: #f5e6c8;
    border: 2px solid #d4a843;
    width: 36px;
    height: 36px;
    border-radius: 50%;
    font-size: 22px;
    line-height: 1;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.2s ease;
    box-shadow: 0 2px 6px rgba(0, 0, 0, 0.3);
}

.pbg-close-btn-2b7f9eb8:hover {
    background: linear-gradient(135deg, #a00000, #cc2222);
    transform: scale(1.1);
}

/* === MENU LIST === */
.pbg-menu-list-2b7f9eb8 {
    list-style: none;
    margin: 0;
    padding: 12px 16px;
    flex: 1;
    display: flex;
    flex-direction: column;
    gap: 4px;
}

.pbg-menu-item-2b7f9eb8 {
    border-bottom: 1px solid rgba(139, 90, 43, 0.2);
}

.pbg-menu-item-2b7f9eb8:last-child {
    border-bottom: none;
}

.pbg-menu-link-2b7f9eb8 {
    display: flex;
    align-items: center;
    gap: 14px;
    padding: 14px 16px;
    color: #4a2c0a;
    text-decoration: none;
    font-family: 'Lora', serif;
    font-size: 15px;
    font-weight: 600;
    letter-spacing: 0.5px;
    border-radius: 6px;
    transition: all 0.25s ease;
    position: relative;
    overflow: hidden;
}

.pbg-menu-link-2b7f9eb8::before {
    content: '';
    position: absolute;
    left: 0;
    top: 0;
    width: 3px;
    height: 100%;
    background: #8B0000;
    transform: scaleY(0);
    transition: transform 0.25s ease;
    border-radius: 0 3px 3px 0;
}

.pbg-menu-link-2b7f9eb8:hover {
    background: rgba(139, 90, 43, 0.12);
    color: #8B0000;
    padding-left: 22px;
    text-decoration: none;
}

.pbg-menu-link-2b7f9eb8:hover::before {
    transform: scaleY(1);
}

.pbg-menu-icon-2b7f9eb8 {
    width: 24px;
    text-align: center;
    font-size: 16px;
    color: #8B0000;
    opacity: 0.8;
    transition: all 0.25s ease;
}

.pbg-menu-link-2b7f9eb8:hover .pbg-menu-icon-2b7f9eb8 {
    opacity: 1;
    transform: scale(1.15);
}

/* === PANEL FOOTER === */
.pbg-panel-footer-2b7f9eb8 {
    padding: 16px 24px;
    border-top: 2px solid #d4a843;
    text-align: center;
    font-family: 'Cinzel', serif;
    font-size: 11px;
    font-weight: 600;
    color: #8B5A2B;
    letter-spacing: 1.5px;
    text-transform: uppercase;
    background: linear-gradient(0deg, rgba(139, 90, 43, 0.12) 0%, transparent 100%);
}

/* === OVERLAY === */
.pbg-overlay-2b7f9eb8 {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.45);
    z-index: 99998;
    opacity: 0;
    visibility: hidden;
    transition: all 0.35s ease;
    pointer-events: none;
    backdrop-filter: blur(2px);
}

.pbg-overlay-2b7f9eb8.pbg-visible {
    opacity: 1;
    visibility: visible;
    pointer-events: all;
}

/* === OPEN STATE — move tab to the left of panel === */
.pbg-sidebar-2b7f9eb8.pbg-open .pbg-tab-trigger-2b7f9eb8 {
    right: 360px;
}

/* === MENU ITEM STAGGER ANIMATION === */
.pbg-menu-item-2b7f9eb8 {
    opacity: 0;
    transform: translateX(30px);
    transition: opacity 0.3s ease, transform 0.3s ease;
}

.pbg-sidebar-2b7f9eb8.pbg-open .pbg-menu-item-2b7f9eb8 {
    opacity: 1;
    transform: translateX(0);
}

.pbg-sidebar-2b7f9eb8.pbg-open .pbg-menu-item-2b7f9eb8:nth-child(1) { transition-delay: 0.08s; }
.pbg-sidebar-2b7f9eb8.pbg-open .pbg-menu-item-2b7f9eb8:nth-child(2) { transition-delay: 0.12s; }
.pbg-sidebar-2b7f9eb8.pbg-open .pbg-menu-item-2b7f9eb8:nth-child(3) { transition-delay: 0.16s; }
.pbg-sidebar-2b7f9eb8.pbg-open .pbg-menu-item-2b7f9eb8:nth-child(4) { transition-delay: 0.20s; }
.pbg-sidebar-2b7f9eb8.pbg-open .pbg-menu-item-2b7f9eb8:nth-child(5) { transition-delay: 0.24s; }
.pbg-sidebar-2b7f9eb8.pbg-open .pbg-menu-item-2b7f9eb8:nth-child(6) { transition-delay: 0.28s; }
.pbg-sidebar-2b7f9eb8.pbg-open .pbg-menu-item-2b7f9eb8:nth-child(7) { transition-delay: 0.32s; }
.pbg-sidebar-2b7f9eb8.pbg-open .pbg-menu-item-2b7f9eb8:nth-child(8) { transition-delay: 0.36s; }
.pbg-sidebar-2b7f9eb8.pbg-open .pbg-menu-item-2b7f9eb8:nth-child(9) { transition-delay: 0.40s; }
.pbg-sidebar-2b7f9eb8.pbg-open .pbg-menu-item-2b7f9eb8:nth-child(10) { transition-delay: 0.44s; }

/* === RESPONSIVE === */
@media (max-width: 480px) {
    .pbg-panel-2b7f9eb8 {
        width: 100vw;
        right: -100vw;
    }

    .pbg-sidebar-2b7f9eb8.pbg-open .pbg-tab-trigger-2b7f9eb8 {
        display: none;
    }

    .pbg-tab-trigger-2b7f9eb8 {
        font-size: 12px;
        padding: 8px 18px;
    }
}

@media (min-width: 481px) and (max-width: 768px) {
    .pbg-panel-2b7f9eb8 {
        width: 320px;
        right: -320px;
    }

    .pbg-sidebar-2b7f9eb8.pbg-open .pbg-tab-trigger-2b7f9eb8 {
        right: 320px;
    }
}

/* === SCROLLBAR STYLING === */
.pbg-panel-2b7f9eb8::-webkit-scrollbar {
    width: 6px;
}

.pbg-panel-2b7f9eb8::-webkit-scrollbar-track {
    background: rgba(139, 90, 43, 0.1);
}

.pbg-panel-2b7f9eb8::-webkit-scrollbar-thumb {
    background: #d4a843;
    border-radius: 3px;
}

.pbg-panel-2b7f9eb8::-webkit-scrollbar-thumb:hover {
    background: #b8922e;
}
