/* Fiduvision cookie consent - only $black-c, $red-c, $white-c, $gray-bg from assets/scss/_custom_variables.scss */
.fvc {
    --fvc-bg: #e6e6eb;            /* $gray-bg */
    --fvc-text: #191919;          /* $black-c */
    --fvc-muted: #191919;         /* $black-c */
    --fvc-accent: #FF0037;        /* $red-c */
    --fvc-accent-hover: #191919;  /* $black-c */
    --fvc-accent-text: #fff;      /* $white-c */
    --fvc-border: #cfcfd6;        /* darker $gray-bg */
    --fvc-surface: #fff;          /* $white-c */
    --fvc-radius: 12px;
    --fvc-font: 'Helvetica Neue', sans-serif;

    position: fixed;
    inset: 0;
    z-index: 2147483000;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 16px;
    background: rgba(0, 0, 0, .5);
    font-family: var(--fvc-font);
    font-size: .9375rem;
    line-height: 1.4;
    color: var(--fvc-text);
}
.fvc[hidden] { display: none; }
.fvc *, .fvc *::before, .fvc *::after { box-sizing: border-box; }
html.fvc-lock { overflow: hidden; }

.fvc-box {
    width: 100%;
    max-width: 600px;
    max-height: calc(100vh - 32px);
    overflow-y: auto;
    padding: 28px 32px 24px;
    background: var(--fvc-bg);
    border-radius: 20px;
    box-shadow: 0 10px 40px rgba(0, 0, 0, .3);
}

/* Header: logo | title | close */
.fvc-head {
    display: grid;
    grid-template-columns: 1fr auto 1fr;
    align-items: center;
    gap: 12px;
    margin-bottom: 28px;
}
.fvc-logo { justify-self: start; display: block; height: 42px; width: auto; }
.fvc-title {
    margin: 0;
    font-family: var(--fvc-font);
    font-size: 1.125rem;
    font-weight: 700;
    line-height: 1.2;
    text-align: center;
    color: var(--fvc-text);
}
.fvc-close {
    justify-self: end;
    position: relative;
    width: 24px;
    height: 24px;
    padding: 0;
    cursor: pointer;
    border: 0;
    border-radius: 50%;
    background: var(--fvc-accent);
    transition: background .4s;
}
.fvc-close::before, .fvc-close::after {
    content: "";
    position: absolute;
    left: 50%; top: 50%;
    width: 10px; height: 1.5px;
    background: var(--fvc-accent-text);
}
.fvc-close::before { transform: translate(-50%, -50%) rotate(45deg); }
.fvc-close::after  { transform: translate(-50%, -50%) rotate(-45deg); }
.fvc-close:hover { background: var(--fvc-accent-hover); }

.fvc-text { margin: 0 0 18px; text-align: justify; color: var(--fvc-text); }
.fvc-text:last-of-type { margin-bottom: 0; }

.fvc-actions { display: flex; flex-wrap: wrap; gap: 14px; margin-top: 28px; }
.fvc-main-actions .fvc-btn { flex: 1 1 0; min-width: 120px; }

/* Accept = filled red, Reject / Customize = white */
.fvc-btn {
    cursor: pointer;
    padding: 10px 15px;
    font-family: var(--fvc-font);
    font-size: .875rem;
    font-weight: 700;
    line-height: 20px;
    text-align: center;
    border-radius: 10px;
    border: 2px solid var(--fvc-surface);
    background: var(--fvc-surface);
    color: var(--fvc-text);
    transition: all .4s;
}
.fvc-btn:hover { border-color: var(--fvc-accent); color: var(--fvc-accent); }
.fvc-btn-accept { border-color: var(--fvc-accent); background: var(--fvc-accent); color: var(--fvc-accent-text); }
.fvc-btn-accept:hover { border-color: var(--fvc-accent-hover); background: var(--fvc-accent-hover); color: var(--fvc-accent-text); }
.fvc-btn[hidden] { display: none; }
.fvc-btn:focus-visible, .fvc-close:focus-visible, .fvc input:focus-visible + .fvc-slider, .fvc summary:focus-visible, .fvc-link:focus-visible {
    outline: 3px solid var(--fvc-text);
    outline-offset: 2px;
}

/* Links at the bottom */
.fvc-links { display: flex; flex-wrap: wrap; justify-content: space-between; gap: 6px 16px; margin-top: 18px; }
.fvc-link {
    padding: 0;
    border: 0;
    background: none;
    cursor: pointer;
    font-family: var(--fvc-font);
    font-size: .8125rem;
    font-weight: 700;
    line-height: 1.4;
    color: var(--fvc-accent);
    text-decoration: underline;
}
.fvc-link:hover { color: var(--fvc-text); }
.fvc-links .fvc-link:only-child { margin-left: auto; }

.fvc-panel { margin-top: 18px; border-top: 1px solid var(--fvc-border); }
.fvc-panel[hidden] { display: none; }
.fvc-cat { padding: 14px 0; border-bottom: 1px solid var(--fvc-border); }
.fvc-cat-head { display: flex; justify-content: space-between; align-items: center; gap: 12px; }
.fvc-cat-title { margin: 0; font-weight: 700; }
.fvc-cat-desc { margin: 4px 0 0; color: var(--fvc-muted); }
.fvc-always { font-size: .75rem; font-weight: 600; text-transform: uppercase; color: var(--fvc-accent); }

.fvc-switch { position: relative; display: inline-block; width: 44px; height: 24px; flex: none; }
.fvc-switch input { position: absolute; inset: 0; width: 100%; height: 100%; margin: 0; opacity: 0; cursor: pointer; z-index: 1; }
.fvc-slider { position: absolute; inset: 0; border-radius: 24px; background: var(--fvc-text); transition: background .2s; }
.fvc-slider::before {
    content: ""; position: absolute; left: 3px; top: 3px; width: 18px; height: 18px;
    border-radius: 50%; background: #fff; transition: transform .2s;
}
.fvc-switch input:checked + .fvc-slider { background: var(--fvc-accent); }
.fvc-switch input:checked + .fvc-slider::before { transform: translateX(20px); }

.fvc-more { margin-top: 8px; }
.fvc-more summary { cursor: pointer; color: var(--fvc-accent); font-size: .8125rem; }
.fvc-table-wrap, .fvc-none { margin-top: 8px; }
.fvc-table-wrap { overflow-x: auto; }
.fvc-table { width: 100%; border-collapse: collapse; font-size: .75rem; }
.fvc-table th, .fvc-table td { padding: 6px 8px; text-align: left; vertical-align: top; border: 1px solid var(--fvc-border); }
.fvc-table th { background: var(--fvc-surface); font-weight: 700; }

/* declaration inside a CMS page */
[data-fv-cookie-declaration] .fvc-table { margin-bottom: 16px; }
[data-fv-cookie-declaration] .fvc-table-wrap { overflow-x: auto; }

@media (max-width: 600px) {
    .fvc { padding: 10px; }
    .fvc-box { padding: 20px 18px 18px; border-radius: 16px; }
    .fvc-head { margin-bottom: 18px; }
    .fvc-logo { height: 34px; }
    .fvc-title { font-size: 1rem; }
    .fvc-text { text-align: left; }
    .fvc-actions { margin-top: 20px; }
    .fvc-main-actions { flex-direction: column; gap: 10px; }
    .fvc-main-actions .fvc-btn { flex: none; width: 100%; }
    .fvc-links { flex-direction: column; }
    .fvc-links .fvc-link:only-child { margin-left: 0; }
}
@media (prefers-reduced-motion: reduce) {
    .fvc-btn, .fvc-close, .fvc-slider, .fvc-slider::before { transition: none; }
}
