/* TranslateXYZ — Cookie consent banner + preferences modal
   Bottom-center fixed bar (banner), centered scrim+dialog (modal).
   Pure CSS; no animation libs. All sizing uses CSS vars from variables.css. */

/* ---- Banner ------------------------------------------------------------ */
.txyz-consent {
    position: fixed;
    left: 50%;
    bottom: 16px;
    transform: translateX(-50%);
    width: min(560px, calc(100vw - 24px));
    z-index: 9000;
    background: #fff;
    color: var(--neutral-700, #2A2C2A);
    border: 1px solid var(--neutral-200, #E5E6E5);
    border-radius: 14px;
    box-shadow: 0 18px 48px rgba(15,30,15,0.14), 0 4px 12px rgba(15,30,15,0.06);
    padding: 16px 18px;
    display: none;
    flex-direction: column;
    gap: 12px;
    font-size: 14px;
    line-height: 1.55;
    transition: bottom 0.3s ease;
}
.txyz-consent.is-visible { display: flex; }

.txyz-consent__row {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
}

/* ---- Top-right dismiss (acts as Accept all) ---- */
.txyz-consent__close {
    position: absolute;
    top: -10px;
    right: -10px;
    width: 24px;
    height: 24px;
    border-radius: 50%;
    background: var(--neutral-900, #131413);
    color: #fff;
    border: 2px solid #fff;
    cursor: pointer;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 0;
    box-shadow: 0 2px 6px rgba(0,0,0,0.22);
    transition: background 0.15s ease, transform 0.15s ease, box-shadow 0.15s ease;
}
.txyz-consent__close:hover {
    background: var(--neutral-700, #2A2C2A);
    transform: scale(1.08);
    box-shadow: 0 4px 10px rgba(0,0,0,0.28);
}
.txyz-consent__close:focus-visible {
    outline: none;
    box-shadow: 0 0 0 3px rgba(48,178,48,0.35);
}
.txyz-consent__close svg {
    width: 10px;
    height: 10px;
    pointer-events: none;
}

.txyz-consent__brand {
    display: flex;
    align-items: center;
    flex-shrink: 0;
}
.txyz-consent__brand img {
    width: 110px;
    height: auto;
    display: block;
}

/* When the promo banner is visible, lift the consent banner above it */
body.has-promo-banner .txyz-consent { bottom: 80px; }
@media (max-width: 720px) {
    body.has-promo-banner .txyz-consent { bottom: 152px; }
}

.txyz-consent__title {
    color: var(--neutral-900, #131413);
    font-weight: 700;
    font-size: 15px;
    margin: 0 0 4px;
}
.txyz-consent__body {
    margin: 0;
    color: var(--neutral-600, #3F423F);
    font-size: 13px;
}
.txyz-consent__body a {
    color: var(--green-700, #1A6F1A);
    text-decoration: underline;
    text-underline-offset: 2px;
}
.txyz-consent__body a:hover { color: var(--green-600, #239023); }

.txyz-consent__actions {
    display: flex;
    gap: 8px;
    flex-wrap: wrap;
    justify-content: flex-end;
}
.txyz-consent__btn {
    font: inherit;
    font-weight: 600;
    line-height: 1;
    border-radius: 999px;
    padding: 10px 18px;
    border: 1px solid transparent;
    cursor: pointer;
    white-space: nowrap;
    transition: background 0.15s ease, color 0.15s ease, border-color 0.15s ease;
}
.txyz-consent__btn--primary {
    background: var(--green-500, #30B230);
    color: #fff;
}
.txyz-consent__btn--primary:hover { background: var(--green-600, #239023); }
.txyz-consent__btn--ghost {
    background: transparent;
    color: var(--neutral-700, #2A2C2A);
    border-color: var(--neutral-300, #CDD0CD);
}
.txyz-consent__btn--ghost:hover {
    background: var(--neutral-100, #F1F2F1);
    border-color: var(--neutral-400, #8B8F8B);
}
.txyz-consent__btn--text {
    background: transparent;
    color: var(--neutral-600, #3F423F);
    padding: 10px 12px;
    text-decoration: underline;
    text-underline-offset: 3px;
    font-size: 13px;
}
.txyz-consent__btn--text:hover { color: var(--neutral-900, #131413); }

/* ---- Floating "manage cookies" pill (shown after a decision is made) --- */
.txyz-consent-fab {
    position: fixed;
    left: 16px;
    bottom: 16px;
    z-index: 8990;
    width: 40px;
    height: 40px;
    border-radius: 50%;
    background: #fff;
    color: var(--green-700, #1A6F1A);
    border: 1px solid var(--neutral-200, #E5E6E5);
    box-shadow: 0 6px 16px rgba(15,30,15,0.12);
    cursor: pointer;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 0;
    transition: bottom 0.3s ease, transform 0.15s ease, box-shadow 0.15s ease, border-color 0.15s ease;
    opacity: 0.92;
}
.txyz-consent-fab:hover {
    opacity: 1;
    transform: translateY(-1px);
    box-shadow: 0 10px 22px rgba(15,30,15,0.16);
    border-color: var(--green-300, #86F186);
}
.txyz-consent-fab[hidden] { display: none !important; }
.txyz-consent-fab svg { width: 18px; height: 18px; color: var(--green-600, #239023); }

body.has-promo-banner .txyz-consent-fab { bottom: 80px; }
@media (max-width: 720px) {
    body.has-promo-banner .txyz-consent-fab { bottom: 152px; }
}

/* ---- Modal ------------------------------------------------------------- */
.txyz-consent-modal {
    position: fixed;
    inset: 0;
    z-index: 9100;
    display: none;
    align-items: center;
    justify-content: center;
    padding: 20px;
    background: rgba(8, 16, 8, 0.62);
    backdrop-filter: blur(2px);
}
.txyz-consent-modal.is-open { display: flex; }

.txyz-consent-modal__dialog {
    background: #fff;
    color: var(--neutral-700, #2A2C2A);
    width: min(620px, 100%);
    max-height: calc(100vh - 40px);
    overflow-y: auto;
    border-radius: 16px;
    box-shadow: 0 28px 64px rgba(0,0,0,0.32);
    padding: 28px;
}
.txyz-consent-modal__title {
    margin: 0 0 8px;
    font-size: 22px;
    font-weight: 800;
    color: var(--neutral-900, #131413);
}
.txyz-consent-modal__intro {
    margin: 0 0 20px;
    font-size: 14px;
    line-height: 1.6;
    color: var(--neutral-600, #3F423F);
}
.txyz-consent-modal__intro a {
    color: var(--green-700, #1A6F1A);
    text-decoration: underline;
}

.txyz-consent-group {
    border: 1px solid var(--neutral-200, #E5E6E5);
    border-radius: 12px;
    padding: 14px 16px;
    margin-bottom: 10px;
}
.txyz-consent-group__head {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
}
.txyz-consent-group__name {
    font-weight: 700;
    color: var(--neutral-900, #131413);
    font-size: 14px;
}
.txyz-consent-group__desc {
    margin: 6px 0 0;
    font-size: 13px;
    line-height: 1.55;
    color: var(--neutral-600, #3F423F);
}
.txyz-consent-group__locked {
    font-size: 12px;
    font-weight: 600;
    color: var(--green-700, #1A6F1A);
    background: var(--green-50, #EFFFEF);
    padding: 4px 10px;
    border-radius: 999px;
}

/* Toggle switch */
.txyz-toggle { position: relative; display: inline-block; width: 38px; height: 22px; }
.txyz-toggle input { opacity: 0; width: 0; height: 0; }
.txyz-toggle__track {
    position: absolute; inset: 0;
    background: var(--neutral-300, #CDD0CD);
    border-radius: 999px;
    transition: background 0.15s ease;
    cursor: pointer;
}
.txyz-toggle__track::before {
    content: "";
    position: absolute;
    top: 3px; left: 3px;
    width: 16px; height: 16px;
    background: #fff;
    border-radius: 50%;
    transition: transform 0.18s ease;
    box-shadow: 0 1px 2px rgba(0,0,0,0.18);
}
.txyz-toggle input:checked + .txyz-toggle__track { background: var(--green-500, #30B230); }
.txyz-toggle input:checked + .txyz-toggle__track::before { transform: translateX(16px); }
.txyz-toggle input:focus-visible + .txyz-toggle__track { box-shadow: 0 0 0 3px rgba(48,178,48,0.35); }

.txyz-consent-modal__actions {
    display: flex;
    gap: 10px;
    justify-content: flex-end;
    margin-top: 20px;
    flex-wrap: wrap;
}
.txyz-consent-modal__actions .txyz-consent__btn--ghost {
    color: var(--neutral-700, #2A2C2A);
    border-color: var(--neutral-300, #CDD0CD);
}
.txyz-consent-modal__actions .txyz-consent__btn--ghost:hover {
    background: var(--neutral-100, #F1F2F1);
    border-color: var(--neutral-400, #8B8F8B);
}
.txyz-consent-modal__actions .txyz-consent__btn--text {
    color: var(--neutral-600, #3F423F);
}
.txyz-consent-modal__actions .txyz-consent__btn--text:hover { color: var(--neutral-900, #131413); }

/* ---- Mobile ------------------------------------------------------------ */
@media (max-width: 560px) {
    .txyz-consent {
        bottom: 12px;
        padding: 14px 16px;
        gap: 12px;
    }
    .txyz-consent__brand img { width: 90px; }
    .txyz-consent-modal__dialog { padding: 22px; }
}
