/* ============================================================
   cookie_popup.css — baner cookies i panel preferencji
   Ładowany na KAŻDEJ stronie (przez html_end.php).
   ============================================================ */

/* === OVERLAY === */
.cookie-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.5);
    z-index: 9999;
    display: flex;
    align-items: center;
    justify-content: center;
}

/* === BANNER === */
.cookie-banner {
    background: var(--white);
    width: 100%;
    max-width: 700px;
    border-radius: var(--radius);
    box-shadow: 0 -4px 20px rgba(0, 0, 0, 0.15);
    max-height: 90vh;
    overflow-y: auto;
}

.cookie-banner-content {
    padding: 2rem;
}

.cookie-banner-content h3 {
    font-size: 1.5rem;
    font-weight: 700;
    color: var(--primary);
    margin-bottom: 1rem;
}

.cookie-banner-text {
    font-size: 1.2rem;
    line-height: 1.7;
    color: var(--gray-700);
}

.cookie-policy-link {
    color: var(--accent);
    font-weight: 600;
    text-decoration: none;
}

.cookie-policy-link:hover {
    color: var(--accent-hover);
    text-decoration: underline;
}

.cookie-buttons {
    display: flex;
    flex-direction: column;
    gap: 0.75rem;
    margin-top: 1.5rem;
}

@media (min-width: 500px) {
    .cookie-buttons {
        flex-direction: row;
        justify-content: center;
    }
}

.cookie-buttons .btn-primary,
.cookie-buttons .btn-secondary {
    padding: 0.8rem 1.25rem;
    cursor: pointer;
    font-size: 1rem;
    font-weight: 600;
    border-radius: var(--radius);
    text-align: center;
    display: inline-block;
    transition: all 0.2s;
    font-family: var(--font-family);
    line-height: 1.4;
    width: 100%;
}

.cookie-buttons .btn-primary {
    border: 1px solid var(--accent);
    background: var(--accent);
    color: var(--white);
}

.cookie-buttons .btn-primary:hover {
    background: var(--accent-hover);
    color: var(--white);
    border-color: var(--accent-hover);
}

.cookie-buttons .btn-secondary {
    border: 1px solid var(--accent);
    background: var(--white);
    color: var(--accent);
}

.cookie-buttons .btn-secondary:hover {
    background: var(--accent);
    color: var(--white);
    border-color: var(--accent);
}

@media (min-width: 500px) {
    .cookie-buttons .btn-primary,
    .cookie-buttons .btn-secondary {
        width: auto;
    }
}


/* === SETTINGS PANEL === */
.cookie-settings-panel {
    position: fixed;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    background: var(--white);
    width: 90%;
    max-width: 950px;
    max-height: 85vh;
    border-radius: var(--radius);
    box-shadow: 0 8px 30px rgba(0, 0, 0, 0.2);
    z-index: 10000;
    display: flex;
    flex-direction: column;
}

/* Sticky top */
.cookie-settings-top {
    padding: 1.5rem 2rem 0;
    flex-shrink: 0;
}

.cookie-settings-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 1rem;
}

.cookie-settings-header h3 {
    font-size: 1.5rem;
    font-weight: 700;
    color: var(--primary);
    margin-bottom: 0;
}

.cookie-close-btn {
    background: none;
    border: none;
    font-size: 1.75rem;
    cursor: pointer;
    color: var(--gray-600);
    padding: 0;
    line-height: 1;
}

.cookie-close-btn:hover {
    color: var(--accent);
}

/* Scrollable content */
.cookie-settings-content {
    padding: 0 2rem;
    overflow-y: auto;
    flex: 1;
}

.cookie-intro-text {
    font-size: 1.2rem;
    line-height: 1.7;
    color: var(--gray-700);
    margin-bottom: 0.75rem;
}

/* Category */
.cookie-category {
    border-top: 1px solid var(--gray-200);
    padding: 1.25rem 0;
}

.cookie-category-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.cookie-category-left {
    display: flex;
    align-items: center;
    gap: 0.75rem;
}

.cookie-category-left input[type="checkbox"] {
    width: 18px;
    height: 18px;
    cursor: pointer;
}

.cookie-category-left label {
    font-weight: 600;
    font-size: 1.2rem;
    color: var(--primary);
    cursor: pointer;
}

.cookie-category-right {
    flex-shrink: 0;
}

.toggle-details {
    background: none;
    border: none;
    cursor: pointer;
    padding: 0.25rem;
}

.toggle-btn {
    font-size: 1.5rem;
    font-weight: 700;
    color: var(--primary);
    transition: transform 0.3s;
    display: inline-block;
}

.cookie-category.is-open .toggle-btn {
    transform: rotate(45deg);
}

.cookie-category-subtitle {
    display: block;
    font-size: 1.2rem;
    color: var(--gray-600);
    margin-top: 0.75rem;
    margin-left: 0;
}

.cookie-category-content {
    max-height: 0;
    overflow: hidden;
    transition: max-height 0.3s ease;
    margin-left: 0;
}

.cookie-category.is-open .cookie-category-content {
    max-height: 500px;
}

.cookie-category-content p {
    font-size: 1.2rem;
    line-height: 1.6;
    color: var(--gray-700);
}

/* Sticky footer */
.cookie-settings-buttons {
    padding: 1.5rem 2rem;
    border-top: 1px solid var(--gray-200);
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
    flex-shrink: 0;
}

@media (min-width: 500px) {
    .cookie-settings-buttons {
        flex-direction: row;
        justify-content: center;
    }
}

.cookie-settings-buttons .btn-primary {
    padding: 0.8rem 1.25rem;
    cursor: pointer;
    font-size: 1rem;
    font-weight: 600;
    border-radius: var(--radius);
    text-align: center;
    display: inline-block;
    transition: all 0.2s;
    font-family: var(--font-family);
    line-height: 1.4;
    border: 1px solid var(--accent);
    background: var(--accent);
    color: var(--white);
    width: 100%;
}

.cookie-settings-buttons .btn-primary:hover {
    background: var(--accent-hover);
    color: var(--white);
    border-color: var(--accent-hover);
}

@media (min-width: 500px) {
    .cookie-settings-buttons .btn-primary {
        width: auto;
    }
}
