/* ============================================================
   Klaro! cookie consent — Tapeta editorial restyle v3.
   Feel: gallery announcement card — cream paper, ink + gold,
   one obvious primary CTA, whisper-quiet secondary actions,
   tactile micro-interactions.
   ============================================================ */

/* ---------- Motion ---------- */
@keyframes klaroFadeIn {
    from { opacity: 0; }
    to   { opacity: 1; }
}
@keyframes klaroSlideUp {
    from { opacity: 0; transform: translateY(28px) scale(0.985); }
    to   { opacity: 1; transform: translateY(0) scale(1); }
}
@keyframes klaroItemIn {
    from { opacity: 0; transform: translateY(8px); }
    to   { opacity: 1; transform: translateY(0); }
}

/* ---------- Root reset ---------- */
.klaro,
.klaro * {
    box-sizing: border-box;
    font-family: var(--ff-ui, "Inter", system-ui, sans-serif);
    color: var(--ink, #1d1d1b);
    letter-spacing: 0;
}

.klaro a {
    color: var(--ink, #1d1d1b);
    text-decoration: none;
    border-bottom: 1px solid var(--gold, #B58A2E);
    padding-bottom: 1px;
    transition: color 0.25s ease, border-color 0.25s ease;
}
.klaro a:hover {
    color: var(--gold, #B58A2E);
    border-bottom-color: var(--ink, #1d1d1b);
}

/* ---------- Backdrop ---------- */
.klaro .cookie-modal .cm-bg {
    background: rgba(29, 29, 27, 0.72);
    backdrop-filter: blur(8px);
    -webkit-backdrop-filter: blur(8px);
    animation: klaroFadeIn 0.5s ease-out;
}

/* ---------- Modal frame (cream paper with grain) ---------- */
.klaro .cookie-modal .cm-modal.cm-klaro,
.klaro .cookie-modal .cm-modal {
    /* layered: subtle SVG noise grain over cream parchment */
    background-color: #FAF7F2;
    background-image: url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 200 200'><filter id='n'><feTurbulence type='fractalNoise' baseFrequency='0.9' numOctaves='2' stitchTiles='stitch'/><feColorMatrix values='0 0 0 0 0.11  0 0 0 0 0.11  0 0 0 0 0.11  0 0 0 0.045 0'/></filter><rect width='200' height='200' filter='url(%23n)'/></svg>");
    background-repeat: repeat;
    color: var(--ink, #1d1d1b);
    border: none;
    border-top: 2px solid var(--ink, #1d1d1b);
    border-radius: 0;
    box-shadow: 0 50px 100px rgba(0, 0, 0, 0.28);
    max-width: 640px;
    width: calc(100% - 3rem);
    padding: 0;
    overflow: hidden;
    position: relative;
    animation: klaroSlideUp 0.6s cubic-bezier(0.16, 0.84, 0.32, 1);
}

/* Close X */
.klaro .cookie-modal .cm-modal .hide {
    color: var(--ink, #1d1d1b);
    opacity: 0.45;
    font-size: 20px;
    line-height: 1;
    background: transparent;
    border: none;
    top: 26px;
    right: 26px;
    transition: opacity 0.25s ease, transform 0.35s ease;
}
.klaro .cookie-modal .cm-modal .hide:hover {
    opacity: 1;
    transform: rotate(90deg);
}
.klaro .cookie-modal .cm-modal .hide svg {
    stroke: currentColor;
    fill: none;
    stroke-width: 1.2;
}

/* ---------- Modal header ---------- */
.klaro .cookie-modal .cm-modal .cm-header {
    padding: 3rem 3rem 1.2rem;
    border-bottom: none;
    position: relative;
}

/* Gold hairline eyebrow */
.klaro .cookie-modal .cm-modal .cm-header::before {
    content: "";
    position: absolute;
    top: 3rem;
    left: 3rem;
    width: 28px;
    height: 1px;
    background: var(--gold, #B58A2E);
}

.klaro .cookie-modal .cm-modal .cm-header h1,
.klaro .cookie-modal .cm-modal .cm-header h2,
.klaro .cookie-modal .cm-modal .cm-header .title {
    font-family: var(--ff-display, "Playfair Display", serif) !important;
    font-weight: 400;
    font-size: 2.4rem;
    line-height: 1.18;
    letter-spacing: -0.01em;
    margin: 1.8rem 0 1rem;
    color: var(--ink, #1d1d1b);
}

.klaro .cookie-modal .cm-modal .cm-header p,
.klaro .cookie-modal .cm-modal .cm-header .cm-purpose-description {
    font-family: var(--ff-ui, "Inter", sans-serif);
    font-size: 1.35rem;
    font-weight: 400;
    line-height: 1.6;
    color: rgba(29, 29, 27, 0.7);
    margin: 0;
    max-width: 52ch;
}

/* ---------- Modal body / services list ---------- */
.klaro .cookie-modal .cm-modal .cm-body {
    padding: 0.6rem 3rem 1.2rem;
}
.klaro .cookie-modal .cm-modal .cm-body ul,
.klaro .cookie-modal .cm-modal .cm-body li {
    list-style: none;
    padding: 0;
    margin: 0;
}
.klaro .cookie-modal .cm-modal .cm-body ul.cm-purposes > li.cm-purpose,
.klaro .cookie-modal .cm-modal .cm-body ul.cm-services > li.cm-service {
    border-top: 1px solid rgba(29, 29, 27, 0.10);
    padding: 1.3rem 0;
    position: relative;
    animation: klaroItemIn 0.5s cubic-bezier(0.16, 0.84, 0.32, 1) both;
}
/* Stagger the list items */
.klaro .cookie-modal .cm-modal .cm-body ul > li:nth-child(1) { animation-delay: 0.10s; }
.klaro .cookie-modal .cm-modal .cm-body ul > li:nth-child(2) { animation-delay: 0.16s; }
.klaro .cookie-modal .cm-modal .cm-body ul > li:nth-child(3) { animation-delay: 0.22s; }
.klaro .cookie-modal .cm-modal .cm-body ul > li:nth-child(4) { animation-delay: 0.28s; }
.klaro .cookie-modal .cm-modal .cm-body ul > li:nth-child(5) { animation-delay: 0.34s; }

.klaro .cookie-modal .cm-modal .cm-body ul.cm-purposes > li.cm-purpose:first-child,
.klaro .cookie-modal .cm-modal .cm-body ul.cm-services > li.cm-service:first-child {
    border-top: none;
    margin-top: 0;
    padding-top: 0.6rem;
}

/* Service / purpose titles — editorial caps */
.klaro .cookie-modal .cm-modal .cm-purpose p,
.klaro .cookie-modal .cm-modal .cm-service p,
.klaro .cookie-modal .cm-modal .cm-purpose label .cm-list-title,
.klaro .cookie-modal .cm-modal .cm-service label .cm-list-title {
    font-family: var(--ff-ui, "Inter", sans-serif);
    font-size: 1.25rem;
    font-weight: 600;
    color: var(--ink, #1d1d1b);
    margin: 0;
    letter-spacing: 0.12em;
    text-transform: uppercase;
}
.klaro .cookie-modal .cm-modal .cm-list-description,
.klaro .cookie-modal .cm-modal .cm-purpose-description,
.klaro .cookie-modal .cm-modal .cm-purpose p.purposes,
.klaro .cookie-modal .cm-modal .cm-service p.purposes {
    font-family: var(--ff-ui, "Inter", sans-serif);
    font-size: 1.4rem;
    font-weight: 400;
    color: rgba(29, 29, 27, 0.65);
    line-height: 1.6;
    margin-top: 0.6rem;
    text-transform: none;
    letter-spacing: 0;
}

/* "(required)" / "(opt-out)" tags */
.klaro .cookie-modal .cm-modal .cm-required,
.klaro .cookie-modal .cm-modal .cm-opt-out {
    font-family: var(--ff-ui, "Inter", sans-serif);
    font-size: 1.0rem;
    font-weight: 500;
    color: var(--gold, #B58A2E);
    margin-left: 0.6rem;
    letter-spacing: 0.18em;
    text-transform: uppercase;
}

/* ---------- Switch toggle — slim rectangle with bounce ---------- */
.klaro .cookie-modal .cm-modal .cm-list-input + .cm-list-label .slider {
    background: rgba(29, 29, 27, 0.18);
    border-radius: 0 !important;
    transition: background 0.3s ease;
    width: 38px !important;
    height: 20px !important;
}
.klaro .cookie-modal .cm-modal .cm-list-input + .cm-list-label .slider::before {
    background: #ffffff;
    border-radius: 0 !important;
    width: 14px !important;
    height: 14px !important;
    bottom: 3px !important;
    left: 3px !important;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.3);
    transition: transform 0.4s cubic-bezier(0.34, 1.56, 0.64, 1); /* gentle bounce */
}
.klaro .cookie-modal .cm-modal .cm-list-input:checked + .cm-list-label .slider {
    background: var(--ink, #1d1d1b);
}
.klaro .cookie-modal .cm-modal .cm-list-input:focus-visible + .cm-list-label .slider {
    outline: 1px solid var(--gold, #B58A2E);
    outline-offset: 3px;
}

/* ---------- Footer — stacked priority ---------- */
.klaro .cookie-modal .cm-modal .cm-footer {
    padding: 1.2rem 3rem 2.4rem;
    border-top: none;
    background: transparent;
}
.klaro .cookie-modal .cm-modal .cm-footer .cm-footer-buttons {
    display: flex;
    flex-wrap: wrap;
    gap: 1.4rem 2.4rem;
    align-items: center;
    justify-content: center;
}
.klaro .cookie-modal .cm-modal .cm-footer p.cm-powered-by { display: none; }

/* ---------- Buttons ---------- */
.klaro .cm-btn {
    font-family: var(--ff-ui, "Inter", sans-serif) !important;
    font-size: 1.2rem !important;
    font-weight: 500 !important;
    letter-spacing: 0.16em !important;
    text-transform: uppercase !important;
    padding: 1.4rem 2.4rem !important;
    border-radius: 0 !important;
    border: 1px solid var(--ink, #1d1d1b) !important;
    background: transparent !important;
    color: var(--ink, #1d1d1b) !important;
    transition: background 0.3s ease, color 0.3s ease, border-color 0.3s ease, transform 0.15s ease;
    cursor: pointer;
    min-height: auto !important;
    line-height: 1.2 !important;
    box-shadow: none !important;
}

/* =====  PRIMARY: Accept-all — full-width hero with sliding gold fill  ===== */
.klaro .cm-btn.cm-btn-success,
.klaro .cm-btn.cm-btn-accept-all,
.klaro .cm-btn.cm-btn-accept {
    flex: 1 1 100%;        /* full width — break to its own row */
    order: 1;
    position: relative;
    overflow: hidden;
    isolation: isolate;
    padding: 1.9rem 2.6rem !important;
    font-size: 1.35rem !important;
    letter-spacing: 0.18em !important;
    background: var(--ink, #1d1d1b) !important;
    color: #FAF7F2 !important;
    border-color: var(--ink, #1d1d1b) !important;
    box-shadow: 0 12px 28px rgba(29, 29, 27, 0.18) !important;
}
/* Gold panel that sweeps in from the left */
.klaro .cm-btn.cm-btn-success::before,
.klaro .cm-btn.cm-btn-accept-all::before,
.klaro .cm-btn.cm-btn-accept::before {
    content: "";
    position: absolute;
    inset: 0;
    background: var(--gold, #B58A2E);
    transform: translateX(-101%);
    transition: transform 0.55s cubic-bezier(0.65, 0, 0.35, 1);
    z-index: -1;
}
/* Arrow glyph that slides right on hover */
.klaro .cm-btn.cm-btn-success::after,
.klaro .cm-btn.cm-btn-accept-all::after,
.klaro .cm-btn.cm-btn-accept::after {
    content: " \2192";   /* → */
    display: inline-block;
    margin-left: 0.9rem;
    font-weight: 300;
    transform: translateX(0);
    transition: transform 0.35s cubic-bezier(0.16, 0.84, 0.32, 1);
}
.klaro .cm-btn.cm-btn-success:hover,
.klaro .cm-btn.cm-btn-accept-all:hover,
.klaro .cm-btn.cm-btn-accept:hover {
    background: var(--ink, #1d1d1b) !important;  /* base stays ink; ::before paints gold */
    color: #ffffff !important;
    border-color: var(--ink, #1d1d1b) !important;
    box-shadow: 0 18px 36px rgba(181, 138, 46, 0.32) !important;
}
.klaro .cm-btn.cm-btn-success:hover::before,
.klaro .cm-btn.cm-btn-accept-all:hover::before,
.klaro .cm-btn.cm-btn-accept:hover::before {
    transform: translateX(0);
}
.klaro .cm-btn.cm-btn-success:hover::after,
.klaro .cm-btn.cm-btn-accept-all:hover::after,
.klaro .cm-btn.cm-btn-accept:hover::after {
    transform: translateX(8px);
}
/* Satisfying press */
.klaro .cm-btn.cm-btn-success:active,
.klaro .cm-btn.cm-btn-accept-all:active,
.klaro .cm-btn.cm-btn-accept:active {
    transform: translateY(1px);
    box-shadow: 0 6px 14px rgba(29, 29, 27, 0.22) !important;
}

/* =====  SECONDARY: Decline / Manage — quiet text links below  ===== */
.klaro .cm-btn.cm-btn-decline,
.klaro .cm-btn.cm-btn-info {
    order: 2;
    flex: 0 0 auto;
    background: transparent !important;
    color: rgba(29, 29, 27, 0.6) !important;
    border: none !important;
    padding: 0.4rem 0.4rem !important;
    font-size: 1.1rem !important;
    font-weight: 500 !important;
    letter-spacing: 0.18em !important;
    position: relative;
    transition: color 0.25s ease;
}
.klaro .cm-btn.cm-btn-decline::after,
.klaro .cm-btn.cm-btn-info::after {
    content: "";
    position: absolute;
    left: 0.4rem;
    right: 0.4rem;
    bottom: 0;
    height: 1px;
    background: currentColor;
    transform: scaleX(1);
    transform-origin: center;
    transition: transform 0.4s cubic-bezier(0.16, 0.84, 0.32, 1);
    opacity: 0.4;
}
.klaro .cm-btn.cm-btn-decline:hover,
.klaro .cm-btn.cm-btn-info:hover {
    background: transparent !important;
    color: var(--ink, #1d1d1b) !important;
}
.klaro .cm-btn.cm-btn-decline:hover::after,
.klaro .cm-btn.cm-btn-info:hover::after {
    transform: scaleX(0.55);
    opacity: 1;
    background: var(--gold, #B58A2E);
}

/* ---------- Bottom slim notice (default, non-blocking) ---------- */
.klaro .cookie-notice {
    background-color: #FAF7F2;
    color: var(--ink, #1d1d1b);
    border: none;
    border-top: 1px solid rgba(29, 29, 27, 0.12);
    border-radius: 0;
    box-shadow: 0 -8px 30px rgba(0, 0, 0, 0.08);
    max-width: 100%;
    padding: 0;
    animation: klaroSlideUp 0.5s cubic-bezier(0.16, 0.84, 0.32, 1);
}
.klaro .cookie-notice .cn-body {
    display: flex;
    align-items: center;
    gap: 2.4rem;
    padding: 1.4rem 3rem;
    margin: 0;
    position: relative;
    flex-wrap: wrap;
}
/* Hide title — message is enough at this size */
.klaro .cookie-notice .cn-body h1,
.klaro .cookie-notice .cn-body h2,
.klaro .cookie-notice .cn-body .title {
    display: none;
}
.klaro .cookie-notice .cn-body p {
    font-family: var(--ff-ui, "Inter", sans-serif);
    font-size: 1.3rem;
    line-height: 1.5;
    color: rgba(29, 29, 27, 0.78);
    margin: 0;
    flex: 1 1 240px;
    min-width: 0;
}
.klaro .cookie-notice .cn-ok {
    padding: 0;
    margin: 0;
    display: flex;
    gap: 0.8rem 1.8rem;
    flex-wrap: wrap;
    align-items: center;
    flex: 0 0 auto;
}

/* Notice buttons override the heavy modal-button defaults */
.klaro .cookie-notice .cm-btn {
    font-size: 1.05rem !important;
    letter-spacing: 0.14em !important;
    padding: 0.9rem 1.6rem !important;
}
.klaro .cookie-notice .cm-btn.cm-btn-success,
.klaro .cookie-notice .cm-btn.cm-btn-accept-all,
.klaro .cookie-notice .cm-btn.cm-btn-accept {
    flex: 0 0 auto;       /* not full-width in the slim bar */
    font-size: 1.1rem !important;
    padding: 1rem 1.8rem !important;
    box-shadow: none !important;
}
.klaro .cookie-notice .cm-btn.cm-btn-success:hover,
.klaro .cookie-notice .cm-btn.cm-btn-accept-all:hover,
.klaro .cookie-notice .cm-btn.cm-btn-accept:hover {
    box-shadow: 0 6px 18px rgba(181, 138, 46, 0.28) !important;
}

/* ---------- Floating "Manage privacy" pill ---------- */
.klaro .cookie-modal-notice ~ button.cm-btn,
.klaro > button[data-id="klaro-control"] {
    background: var(--ink, #1d1d1b) !important;
    color: #FAF7F2 !important;
    font-family: var(--ff-ui, "Inter", sans-serif) !important;
    font-size: 1.05rem !important;
    font-weight: 500 !important;
    letter-spacing: 0.18em !important;
    text-transform: uppercase !important;
    border: none !important;
    border-radius: 0 !important;
    padding: 1rem 1.6rem !important;
    box-shadow: 0 8px 24px rgba(0, 0, 0, 0.22) !important;
    transition: background 0.3s ease, transform 0.2s ease;
}
.klaro .cookie-modal-notice ~ button.cm-btn:hover,
.klaro > button[data-id="klaro-control"]:hover {
    background: var(--gold, #B58A2E) !important;
    transform: translateY(-1px);
}

/* ---------- Mobile ---------- */
@media (max-width: 640px) {
    .klaro .cookie-modal .cm-modal .cm-header,
    .klaro .cookie-modal .cm-modal .cm-body,
    .klaro .cookie-modal .cm-modal .cm-footer,
    .klaro .cookie-notice .cn-body {
        padding-left: 2.4rem;
        padding-right: 2.4rem;
    }
    .klaro .cookie-modal .cm-modal .cm-header {
        padding-top: 3.4rem;
    }
    .klaro .cookie-modal .cm-modal .cm-header::before,
    .klaro .cookie-notice .cn-body::before {
        top: 3.4rem;
        left: 2.4rem;
    }
    .klaro .cookie-modal .cm-modal .cm-header h1,
    .klaro .cookie-modal .cm-modal .cm-header .title {
        font-size: 2.6rem;
    }
    .klaro .cookie-modal .cm-modal .cm-footer {
        padding-bottom: 2.8rem;
    }
    .klaro .cm-btn.cm-btn-success,
    .klaro .cm-btn.cm-btn-accept-all,
    .klaro .cm-btn.cm-btn-accept {
        padding: 1.7rem 2rem !important;
        font-size: 1.25rem !important;
    }
    .klaro .cm-btn.cm-btn-decline,
    .klaro .cm-btn.cm-btn-info {
        font-size: 1.05rem !important;
    }
}
