﻿.popup-toggle {
    display: none;
}

.popup-open-btn {
    position: fixed;
    left: 50%;
    bottom: 2rem;
    transform: translateX(-50%);
    display: inline-block;
    padding: 0.9rem 1.6rem;
    font-size: 1.05rem;
    font-weight: 700;
    color: #fff;
    background: linear-gradient(135deg, #ff7a18 0%, #af002d 100%);
    border-radius: 999px;
    border: none;
    box-shadow: 0 10px 25px rgba(0,0,0,0.18), 0 2px 6px rgba(255,123,86,0.12) inset;
    cursor: pointer;
    text-decoration: none;
    transition: transform .14s ease, box-shadow .14s ease, filter .14s ease;
    z-index: 50;
}

    .popup-open-btn:hover,
    .popup-open-btn:focus {
        transform: translateX(-50%) translateY(-3px);
        box-shadow: 0 16px 36px rgba(0,0,0,0.25);
        filter: brightness(1.03);
        outline: none;
    }

    .popup-open-btn:active {
        transform: translateX(-50%) translateY(0);
        box-shadow: 0 8px 18px rgba(0,0,0,0.2);
    }

@media (max-width: 420px) {
    .popup-open-btn {
        bottom: 1rem;
        padding: 0.75rem 1.2rem;
        font-size: 0.95rem;
    }
}

.popup-overlay {
    position: fixed;
    inset: 0;
    background: rgba(0,0,0,0.45);
    display: none;
    align-items: center;
    justify-content: center;
    z-index: 1000;
    padding: 20px;
}

.popup-toggle:checked + .popup-open-btn + .popup-overlay {
    display: flex;
}

.popup-modal {
    background: #fff;
    border-radius: 8px;
    width: 100%;
    max-width: 720px;
    box-shadow: 0 8px 24px rgba(0,0,0,0.2);
    overflow: hidden;
}

.popup-header {
    padding: 12px 16px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    border-bottom: 1px solid #eee;
    background: #fafafa;
}

.popup-title {
    font-weight: 600;
    margin: 0;
}

.popup-close {
    background: transparent;
    border: none;
    font-size: 20px;
    line-height: 1;
    cursor: pointer;
    padding: 6px;
}

.popup-body {
    padding: 16px;
}

.categories {
    max-width: 360px;
    margin: 0;
    padding: 0;
    list-style: none;
    font-family: Arial, sans-serif;
}

details {
    border: 1px solid #ddd;
    margin-bottom: 6px;
    border-radius: 4px;
    background: #fff;
    overflow: visible;
}

summary {
    cursor: pointer;
    padding: 12px 16px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    user-select: none;
    font-weight: 600;
}

    summary::-webkit-details-marker {
        display: none;
    }

.caret {
    transition: transform 0.2s ease;
}

details[open] .caret {
    transform: rotate(90deg);
}

.submenu {
    padding: 8px 16px 20px 16px;
    background: #fafafa;
    border-top: 1px solid #eee;
    max-height: 240px;
    overflow-y: auto;
}

    .submenu a {
        display: block;
        padding: 8px 0;
        color: #333;
        text-decoration: none;
        border-radius: 3px;
    }

        .submenu a:hover {
            background: #f0f0f0;
        }

        .submenu a:last-child {
            margin-bottom: 8px;
        }

@media (max-width: 420px) {
    .submenu {
        padding-bottom: 24px;
    }

        .submenu a {
            padding: 10px 0;
        }
}

.popup-modal .popup-header:first-of-type {
    background-color: #0d6efd;
    color: #ffffff;
    padding: 12px 16px;
}

.popup-modal .popup-header:nth-of-type(2) {
    background-color: #f8f9fa;
    color: #212529;
    padding: 10px 16px;
}

.popup-modal .popup-header .popup-title {
    margin: 0;
}

.popup-modal .popup-close {
    color: #ffffff;
}
