/* PyTaste — Cookie consent banner (themed to site palette) */
.cc-banner {
    position: fixed;
    left: 1rem;
    right: 1rem;
    bottom: 1rem;
    z-index: 9990;
    max-width: 720px;
    margin: 0 auto;
    background: #ffffff;
    color: #2c3e30;
    border-radius: 18px;
    box-shadow: 0 18px 48px rgba(31, 48, 36, 0.25);
    padding: 1.5rem 1.75rem;
    font-family: 'Inter', system-ui, sans-serif;
    font-size: 0.95rem;
    line-height: 1.55;
    border: 1px solid rgba(76, 175, 125, 0.18);
    transform: translateY(160%);
    transition: transform 0.45s cubic-bezier(0.34, 1.2, 0.64, 1);
}
.cc-banner.cc-visible { transform: translateY(0); }

.cc-title {
    font-family: 'Fraunces', Georgia, serif;
    font-size: 1.2rem;
    font-weight: 600;
    margin: 0 0 0.5rem;
    color: #2c3e30;
}
.cc-text { color: #5f6f63; margin: 0 0 1.25rem; font-size: 0.95rem; }
.cc-text a { color: #2e7d56; font-weight: 500; }

.cc-actions {
    display: flex;
    flex-wrap: wrap;
    gap: 0.6rem;
}

.cc-btn {
    border: 1.5px solid transparent;
    border-radius: 999px;
    padding: 0.7rem 1.4rem;
    font: inherit;
    font-weight: 600;
    cursor: pointer;
    transition: background 0.2s ease, color 0.2s ease, box-shadow 0.2s ease, transform 0.2s ease;
    white-space: nowrap;
}
.cc-btn--accept {
    background: #4caf7d;
    color: #fff;
    box-shadow: 0 4px 14px rgba(76, 175, 125, 0.3);
}
.cc-btn--accept:hover {
    background: #2e7d56;
    box-shadow: 0 6px 20px rgba(76, 175, 125, 0.45);
    transform: translateY(-1px);
}
.cc-btn--reject {
    background: #ffffff;
    color: #2c3e30;
    border-color: #d9e3dc;
}
.cc-btn--reject:hover {
    background: rgba(76, 175, 125, 0.08);
    border-color: #4caf7d;
    color: #2e7d56;
}
.cc-btn--customize {
    background: transparent;
    color: #2e7d56;
    border-color: transparent;
}
.cc-btn--customize:hover { color: #1f3024; text-decoration: underline; }

/* Modal for category settings */
.cc-modal {
    position: fixed; inset: 0;
    z-index: 9995;
    display: none;
    align-items: center; justify-content: center;
    padding: 1.5rem;
    background: rgba(31, 48, 36, 0.55);
    animation: cc-fade 240ms ease both;
}
.cc-modal.cc-open { display: flex; }
.cc-modal__card {
    background: #ffffff;
    max-width: 540px;
    width: 100%;
    border-radius: 18px;
    padding: 2rem;
    max-height: 85vh;
    overflow-y: auto;
    box-shadow: 0 24px 64px rgba(31, 48, 36, 0.3);
}
.cc-modal__card h3 {
    font-family: 'Fraunces', Georgia, serif;
    font-size: 1.35rem;
    margin: 0 0 1.25rem;
    color: #2c3e30;
}
.cc-category {
    padding: 1rem 0;
    border-bottom: 1px solid #e0e6e0;
}
.cc-category:last-of-type { border-bottom: none; }
.cc-category__head {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 1rem;
}
.cc-category__title {
    font-weight: 600;
    font-size: 1rem;
    color: #2c3e30;
}
.cc-category__desc {
    font-size: 0.88rem;
    color: #5f6f63;
    margin: 0.4rem 0 0;
}
.cc-toggle {
    position: relative;
    width: 44px; height: 24px;
    background: #d9e3dc;
    border-radius: 999px;
    cursor: pointer;
    flex-shrink: 0;
    transition: background 0.2s ease;
}
.cc-toggle::after {
    content: "";
    position: absolute;
    top: 2px; left: 2px;
    width: 20px; height: 20px;
    background: #fff;
    border-radius: 50%;
    transition: transform 0.2s ease;
    box-shadow: 0 2px 4px rgba(0,0,0,0.15);
}
.cc-toggle.cc-on { background: #4caf7d; }
.cc-toggle.cc-on::after { transform: translateX(20px); }
.cc-toggle.cc-locked { background: #4caf7d; opacity: 0.6; cursor: not-allowed; }
.cc-toggle.cc-locked::after { transform: translateX(20px); }

.cc-modal__actions {
    display: flex;
    gap: 0.75rem;
    margin-top: 1.5rem;
    justify-content: flex-end;
}

@keyframes cc-fade { from { opacity: 0 } to { opacity: 1 } }

@media (max-width: 600px) {
    .cc-banner { padding: 1.25rem; }
    .cc-actions { flex-direction: column; }
    .cc-btn { width: 100%; }
}
