/* ==========================================================================
   Consent UI — cookie "footnote" card + personal-data checkboxes
   Law RM 195/2024. Palette/typography from the site (olive #6B8E23 / #556B2F,
   Merriweather body, Poppins headings).
   ========================================================================== */
:root {
    --pd-olive: #6B8E23;
    --pd-olive-dark: #556B2F;
    --pd-ink: #1d2a0c;
    --pd-ink-soft: #4a4636;
    --pd-paper: #fbf8f0;
    --pd-paper-edge: #e6dcc4;
    --pd-rule: #cbbf9f;
}

/* ---------- Cookie card: a footnote slip with a bookmark ribbon ---------- */
.pd-cookie {
    position: fixed;
    right: 24px;
    bottom: 24px;
    z-index: 9999;
    width: min(372px, calc(100vw - 32px));
    box-sizing: border-box;
    padding: 26px 26px 20px;
    background:
        linear-gradient(180deg, rgba(255,255,255,.55), rgba(255,255,255,0) 40%),
        var(--pd-paper);
    border: 1px solid var(--pd-paper-edge);
    border-radius: 3px;
    box-shadow:
        0 1px 0 rgba(255,255,255,.8) inset,
        0 2px 4px rgba(60, 50, 20, .06),
        0 18px 40px -12px rgba(60, 50, 20, .28);
    font-family: 'Merriweather', Georgia, serif;
    color: var(--pd-ink-soft);
    opacity: 0;
    transform: translateY(14px);
    transition: opacity .28s ease, transform .28s cubic-bezier(.2, .7, .2, 1);
}
.pd-cookie.is-visible { opacity: 1; transform: none; }
.pd-cookie[hidden] { display: none; }

/* bookmark ribbon hanging over the top edge */
.pd-cookie__ribbon {
    position: absolute;
    top: -6px;
    right: 26px;
    width: 18px;
    height: 46px;
    background: linear-gradient(180deg, var(--pd-olive-dark), var(--pd-olive));
    clip-path: polygon(0 0, 100% 0, 100% 100%, 50% 78%, 0 100%);
    box-shadow: 0 2px 3px rgba(0,0,0,.15);
}
.pd-cookie__ribbon::before { /* fold where the ribbon meets the edge */
    content: '';
    position: absolute;
    left: -4px; top: 0;
    border-right: 4px solid #3f5022;
    border-top: 6px solid transparent;
}

.pd-cookie__kicker {
    margin: 0 0 2px;
    font-family: 'Merriweather', Georgia, serif;
    font-size: .68rem;
    font-weight: 400;
    letter-spacing: .18em;
    text-transform: uppercase;
    color: var(--pd-olive);
}
.pd-cookie__title {
    margin: 0 44px 12px 0;
    font-family: 'Merriweather', Georgia, serif;
    font-size: 1.12rem;
    font-weight: 700;
    font-style: italic;
    line-height: 1.35;
    color: var(--pd-ink);
}
.pd-cookie__title sup {
    font-style: normal;
    color: var(--pd-olive);
    margin-right: 3px;
    font-size: .8em;
}
/* the classic footnote separator rule */
.pd-cookie__text {
    position: relative;
    padding-top: 12px;
}
.pd-cookie__text::before {
    content: '';
    position: absolute;
    top: 0; left: 0;
    width: 64px;
    border-top: 1px solid var(--pd-rule);
}
.pd-cookie__text p {
    margin: 0 0 8px;
    font-size: .82rem;
    line-height: 1.65;
}
.pd-cookie__text strong { color: var(--pd-ink); font-weight: 700; }
.pd-cookie__fine { font-size: .74rem !important; color: #6d6754; }
.pd-cookie__text a {
    color: var(--pd-olive-dark);
    font-weight: 700;
    text-decoration: underline;
    text-decoration-thickness: 1px;
    text-underline-offset: 2px;
}

/* two equivalent buttons: same size, weight and style */
.pd-cookie__actions {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 10px;
    margin-top: 14px;
}
.pd-cookie__btn {
    min-height: 42px;
    padding: 9px 12px;
    background: transparent;
    border: 1px solid var(--pd-olive-dark);
    border-radius: 2px;
    font-family: 'Merriweather', Georgia, serif;
    font-size: .84rem;
    font-weight: 700;
    letter-spacing: .03em;
    color: var(--pd-olive-dark);
    cursor: pointer;
    transition: background-color .18s ease, color .18s ease;
}
.pd-cookie__btn:hover { background: var(--pd-olive-dark); color: #fff; }
.pd-cookie__btn:focus-visible,
.pd-cookie__text a:focus-visible {
    outline: 2px solid var(--pd-olive);
    outline-offset: 2px;
}
.pd-cookie__status {
    margin: 10px 0 0;
    font-size: .72rem;
    font-style: italic;
    color: #6d6754;
}

@media (max-width: 600px) {
    .pd-cookie {
        right: 10px;
        left: 10px;
        bottom: 10px;
        width: auto;
        padding: 18px 18px 14px;
    }
    .pd-cookie__title { font-size: 1rem; margin-bottom: 8px; }
    .pd-cookie__text p { font-size: .78rem; line-height: 1.55; }
    .pd-cookie__ribbon { height: 36px; right: 18px; }
}
@media (prefers-reduced-motion: reduce) {
    .pd-cookie { transition: none; transform: none; }
}

/* footer "Setări cookie" link — looks like the other footer links */
.footer-cookie-link {
    background: none;
    border: 0;
    color: #fff;
    font: 500 1rem 'Poppins', sans-serif;
    padding: 8px 16px;
    border-radius: 8px;
    cursor: pointer;
}
.footer-cookie-link:hover { background: rgba(255,255,255,.12); }
.footer-cookie-link:focus-visible { outline: 2px solid #fff; outline-offset: 2px; }

/* ---------- Personal-data checkbox (native input, custom box) ---------- */
.pd-check {
    position: relative;
    margin: 18px 0 6px;
    text-align: left;
}
.pd-check + .pd-check { margin-top: 12px; }
.pd-check__input {
    position: absolute;
    opacity: 0;
    width: 22px;
    height: 22px;
    margin: 0;
    left: 0;
    top: 0;
    cursor: pointer;
}
.pd-check__label {
    display: grid;
    grid-template-columns: 22px 1fr;
    gap: 12px;
    align-items: start;
    cursor: pointer;
    font-size: .86rem;
    line-height: 1.55;
    color: #4a4f45;
}
.pd-check__box {
    width: 22px;
    height: 22px;
    box-sizing: border-box;
    border: 2px solid #d3d8c8;
    border-radius: 6px;
    background: #f8f9fa;
    position: relative;
    transition: border-color .2s ease, background-color .2s ease, box-shadow .2s ease;
}
.pd-check__box::after {
    content: '';
    position: absolute;
    left: 6px; top: 2px;
    width: 6px; height: 11px;
    border: solid #fff;
    border-width: 0 2px 2px 0;
    transform: rotate(45deg) scale(0);
    transition: transform .15s ease;
}
.pd-check__input:checked + .pd-check__label .pd-check__box {
    background: var(--pd-olive);
    border-color: var(--pd-olive);
}
.pd-check__input:checked + .pd-check__label .pd-check__box::after { transform: rotate(45deg) scale(1); }
.pd-check__input:focus-visible + .pd-check__label .pd-check__box {
    box-shadow: 0 0 0 3px rgba(107, 142, 35, .25);
    border-color: var(--pd-olive);
}
.pd-check__input:hover + .pd-check__label .pd-check__box { border-color: var(--pd-olive); }
.pd-check__text a {
    color: var(--pd-olive-dark);
    font-weight: 600;
    text-decoration: underline;
    text-underline-offset: 2px;
}
.pd-check__note {
    display: block;
    margin: 4px 0 0 34px;
    font-size: .76rem;
    color: #888;
    line-height: 1.4;
}
.pd-check--error .pd-check__box { border-color: #c0392b; }
.pd-check__error { color: #c0392b; font-weight: 600; }

/* purchase page: grouped checkboxes on the existing info card */
.pd-consent-group {
    margin-bottom: 25px;
    padding: 6px 20px 16px;
    background: #f8f9fa;
    border-radius: 10px;
    border-left: 4px solid var(--pd-olive);
}

/* auth pages use the green form palette (forms.css) */
.login-form .pd-check__input:checked + .pd-check__label .pd-check__box { background: #27ae60; border-color: #27ae60; }
.login-form .pd-check__input:focus-visible + .pd-check__label .pd-check__box { border-color: #27ae60; box-shadow: 0 0 0 3px rgba(39, 174, 96, .15); }
.login-form .pd-check__input:hover + .pd-check__label .pd-check__box { border-color: #27ae60; }
.login-form .pd-check__text a { color: #1e8449; }
