/* Cookie consent — matches news_tgn_0002 (cream / forest / terracotta) */
.cookie-consent-banner {
    position: fixed;
    bottom: 0;
    left: 0;
    right: 0;
    z-index: 9999;
    display: none;
    padding: 20px 16px calc(20px + env(safe-area-inset-bottom, 0px));
    background: rgba(245, 242, 235, 0.97);
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
    color: #2d5016;
    border-top: 1px solid rgba(45, 80, 22, 0.15);
    box-shadow: 0 -12px 40px rgba(45, 80, 22, 0.12);
    font-family: Lora, Georgia, 'Times New Roman', serif;
    animation: n2-cookie-slide-up 0.4s ease-out;
}

@keyframes n2-cookie-slide-up {
    from { transform: translateY(100%); opacity: 0; }
    to { transform: translateY(0); opacity: 1; }
}

.cookie-consent-banner.show { display: block; }

.cookie-consent-content {
    max-width: 1100px;
    margin: 0 auto;
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    justify-content: space-between;
    gap: 16px 24px;
}

.cookie-consent-text {
    flex: 1;
    min-width: min(100%, 280px);
}

.cookie-consent-text > div:first-child {
    margin-bottom: 8px;
    font-family: 'Playfair Display', Georgia, serif;
    font-size: 1.05rem;
    font-weight: 600;
    color: #2d5016;
}

.cookie-consent-text p {
    margin: 0 0 8px;
    font-size: 0.9rem;
    line-height: 1.6;
    color: rgba(45, 80, 22, 0.78);
}

.cookie-consent-text a {
    color: #c65d3b;
    font-weight: 600;
    text-decoration: underline;
    text-underline-offset: 3px;
}

.cookie-consent-text a:hover { color: #a44a2e; }

.cookie-consent-buttons {
    display: flex;
    flex-shrink: 0;
    flex-wrap: wrap;
    gap: 10px;
}

.cookie-btn {
    padding: 10px 20px;
    border-radius: 999px;
    border: 1px solid transparent;
    font-family: inherit;
    font-size: 0.875rem;
    font-weight: 600;
    cursor: pointer;
    transition: background 0.2s ease, border-color 0.2s ease, color 0.2s ease, transform 0.2s ease;
}

.cookie-btn-accept {
    background: #c65d3b;
    color: #f5f2eb;
    border-color: #c65d3b;
}

.cookie-btn-accept:hover {
    background: #a44a2e;
    transform: translateY(-1px);
}

.cookie-btn-reject {
    background: transparent;
    color: #2d5016;
    border-color: rgba(45, 80, 22, 0.3);
}

.cookie-btn-reject:hover {
    background: rgba(45, 80, 22, 0.06);
    border-color: #2d5016;
}

.cookie-btn-settings {
    background: transparent;
    color: #c65d3b;
    border-color: rgba(198, 93, 59, 0.4);
}

.cookie-btn-settings:hover {
    background: rgba(198, 93, 59, 0.12);
    border-color: #c65d3b;
}

.cookie-settings-modal {
    display: none;
    position: fixed;
    inset: 0;
    z-index: 10000;
    align-items: center;
    justify-content: center;
    padding: 20px;
    background: rgba(45, 80, 22, 0.45);
}

.cookie-settings-modal.show { display: flex; }

.cookie-settings-content {
    width: 100%;
    max-width: 560px;
    max-height: 90vh;
    overflow-y: auto;
    padding: 28px 24px;
    border-radius: 4px;
    background: #f5f2eb;
    color: #2d5016;
    border: 1px solid rgba(45, 80, 22, 0.12);
    box-shadow: 0 18px 50px rgba(45, 80, 22, 0.18);
    animation: n2-cookie-modal-in 0.25s ease-out;
}

@keyframes n2-cookie-modal-in {
    from { opacity: 0; transform: translateY(8px); }
    to { opacity: 1; transform: translateY(0); }
}

.cookie-settings-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    margin-bottom: 20px;
    padding-bottom: 14px;
    border-bottom: 1px solid rgba(45, 80, 22, 0.15);
}

.cookie-settings-header > div {
    font-family: 'Playfair Display', Georgia, serif;
    font-size: 1.25rem;
    font-weight: 600;
    color: #2d5016;
}

.cookie-settings-close {
    width: 36px;
    height: 36px;
    padding: 0;
    border: 1px solid rgba(45, 80, 22, 0.2);
    border-radius: 999px;
    background: transparent;
    font-size: 1.4rem;
    line-height: 1;
    color: rgba(45, 80, 22, 0.55);
    cursor: pointer;
}

.cookie-settings-close:hover {
    color: #c65d3b;
    border-color: #c65d3b;
}

.cookie-setting-item {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 16px;
    padding: 14px 0;
    border-bottom: 1px solid rgba(45, 80, 22, 0.1);
}

.cookie-setting-item:last-child { border-bottom: none; }

.cookie-setting-info > div {
    margin-bottom: 4px;
    font-size: 0.95rem;
    font-weight: 600;
}

.cookie-setting-info p {
    margin: 0;
    font-size: 0.82rem;
    line-height: 1.5;
    color: rgba(45, 80, 22, 0.7);
}

.cookie-toggle {
    position: relative;
    flex-shrink: 0;
    width: 48px;
    height: 26px;
}

.cookie-toggle input {
    opacity: 0;
    width: 0;
    height: 0;
}

.cookie-toggle-slider {
    position: absolute;
    inset: 0;
    cursor: pointer;
    border-radius: 999px;
    background: rgba(45, 80, 22, 0.18);
    transition: 0.3s;
}

.cookie-toggle-slider:before {
    content: "";
    position: absolute;
    height: 18px;
    width: 18px;
    left: 4px;
    bottom: 4px;
    border-radius: 50%;
    background: #f5f2eb;
    box-shadow: 0 1px 3px rgba(45, 80, 22, 0.2);
    transition: 0.3s;
}

.cookie-toggle input:checked + .cookie-toggle-slider {
    background: #c65d3b;
}

.cookie-toggle input:checked + .cookie-toggle-slider:before {
    transform: translateX(22px);
}

.cookie-toggle.disabled { opacity: 0.5; cursor: not-allowed; }
.cookie-toggle.disabled input { cursor: not-allowed; }

.cookie-settings-footer {
    display: flex;
    flex-wrap: wrap;
    justify-content: flex-end;
    gap: 10px;
    margin-top: 20px;
    padding-top: 16px;
    border-top: 1px solid rgba(45, 80, 22, 0.15);
}

@media (max-width: 768px) {
    .cookie-consent-content { flex-direction: column; text-align: center; }
    .cookie-consent-buttons { width: 100%; justify-content: center; }
    .cookie-btn { flex: 1; min-width: 0; }
    .cookie-setting-item { flex-direction: column; align-items: flex-start; }
    .cookie-toggle { align-self: flex-end; }
    .cookie-settings-footer { flex-direction: column; }
    .cookie-settings-footer .cookie-btn { width: 100%; }
}
