/* Faciotech cookie banner + preferences — aligned with faciotech.com (ft-cookie-*). */
.ft-cookie-consent {
    position: fixed;
    left: 50%;
    bottom: 12px;
    transform: translateX(-50%);
    width: min(900px, calc(100% - 24px));
    z-index: 2147483000;
}
.ft-cookie-consent[hidden] {
    display: none !important;
}
.ft-cookie-consent__inner {
    display: flex;
    align-items: center;
    gap: 14px;
    padding: 12px 14px;
    border-radius: 12px;
    border: 1px solid #d9e1f0;
    background: #fff;
    box-shadow: 0 10px 32px rgba(15, 23, 42, 0.14);
}
.ft-cookie-consent__text {
    flex: 1 1 auto;
    margin: 0;
    color: #4f5564;
    font-size: 14px;
    line-height: 1.45;
}
.ft-cookie-consent__text a {
    color: #0146c7;
    font-weight: 600;
}
.ft-cookie-consent__actions {
    flex: 0 0 auto;
    display: flex;
    align-items: center;
    gap: 6px;
}
.ft-cookie-consent__btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    border: none;
    border-radius: 8px;
    padding: 9px 16px;
    font-size: 14px;
    font-weight: 600;
    line-height: 1.4;
    cursor: pointer;
    white-space: nowrap;
    transition: background 0.15s, color 0.15s;
}
.ft-cookie-consent__btn:focus-visible {
    outline: 3px solid #ffd602;
    outline-offset: 2px;
}
.ft-cookie-consent__btn--primary {
    background: #0146c7;
    color: #fff;
}
.ft-cookie-consent__btn--primary:hover {
    background: #0139a5;
}
.ft-cookie-consent__btn--outline {
    background: transparent;
    border: 1px solid #d0d5dd;
    color: #344054;
}
.ft-cookie-consent__btn--outline:hover {
    background: #f2f4f7;
}
.ft-cookie-consent__btn--link {
    background: transparent;
    color: #475467;
    padding: 9px 12px;
}
.ft-cookie-consent__btn--link:hover {
    color: #0146c7;
}

.ft-cookie-prefs {
    position: fixed;
    inset: 0;
    z-index: 2147483001;
}
.ft-cookie-prefs[hidden] {
    display: none !important;
}
.ft-cookie-prefs__overlay {
    position: absolute;
    inset: 0;
    background: rgba(4, 17, 51, 0.45);
    cursor: pointer;
}
.ft-cookie-prefs__panel {
    position: absolute;
    bottom: 0;
    left: 50%;
    transform: translateX(-50%);
    width: min(520px, calc(100% - 24px));
    max-height: 85vh;
    display: flex;
    flex-direction: column;
    background: #fff;
    border-radius: 16px 16px 0 0;
    box-shadow: 0 -8px 40px rgba(15, 23, 42, 0.2);
    overflow: hidden;
}
.ft-cookie-prefs__header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 16px 20px;
    border-bottom: 1px solid #e5e7eb;
}
.ft-cookie-prefs__title {
    font-size: 17px;
    font-weight: 700;
    margin: 0;
    color: #041133;
}
.ft-cookie-prefs__close {
    background: transparent;
    border: none;
    font-size: 24px;
    line-height: 1;
    color: #6b7280;
    cursor: pointer;
    padding: 0 4px;
}
.ft-cookie-prefs__close:hover {
    color: #111827;
}
.ft-cookie-prefs__close:focus-visible {
    outline: 3px solid #ffd602;
    outline-offset: 2px;
}
.ft-cookie-prefs__body {
    padding: 16px 20px;
    overflow-y: auto;
    flex: 1 1 auto;
}
.ft-cookie-prefs__intro {
    font-size: 14px;
    color: #6b7280;
    margin: 0 0 16px;
    line-height: 1.5;
}
.ft-cookie-prefs__category {
    padding: 14px 0;
    border-top: 1px solid #f3f4f6;
}
.ft-cookie-prefs__category:first-of-type {
    border-top: none;
    padding-top: 0;
}
.ft-cookie-prefs__cat-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
}
.ft-cookie-prefs__cat-name {
    font-size: 15px;
    font-weight: 600;
    color: #041133;
}
.ft-cookie-prefs__cat-badge {
    display: inline-block;
    font-size: 11px;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.04em;
    padding: 3px 8px;
    border-radius: 4px;
    background: #ecfdf5;
    color: #059669;
}
.ft-cookie-prefs__cat-desc {
    font-size: 13px;
    color: #6b7280;
    margin: 6px 0 0;
    line-height: 1.45;
}
.ft-cookie-prefs__toggle {
    position: relative;
    display: inline-block;
    width: 40px;
    height: 22px;
    flex-shrink: 0;
}
.ft-cookie-prefs__toggle input {
    opacity: 0;
    width: 0;
    height: 0;
    position: absolute;
}
.ft-cookie-prefs__toggle-track {
    position: absolute;
    inset: 0;
    background: #d1d5db;
    border-radius: 11px;
    cursor: pointer;
    transition: background 0.2s;
}
.ft-cookie-prefs__toggle-track::after {
    content: '';
    position: absolute;
    top: 2px;
    left: 2px;
    width: 18px;
    height: 18px;
    background: #fff;
    border-radius: 50%;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.15);
    transition: transform 0.2s;
}
.ft-cookie-prefs__toggle input:checked + .ft-cookie-prefs__toggle-track {
    background: #0146c7;
}
.ft-cookie-prefs__toggle input:checked + .ft-cookie-prefs__toggle-track::after {
    transform: translateX(18px);
}
.ft-cookie-prefs__toggle input:focus-visible + .ft-cookie-prefs__toggle-track {
    outline: 3px solid #ffd602;
    outline-offset: 2px;
}
.ft-cookie-prefs__category--toggle {
    display: block;
    cursor: pointer;
}
.ft-cookie-prefs__footer {
    display: flex;
    gap: 8px;
    justify-content: flex-end;
    padding: 14px 20px;
    border-top: 1px solid #e5e7eb;
}

@media (max-width: 767.98px) {
    .ft-cookie-consent {
        width: calc(100% - 16px);
        bottom: calc(8px + env(safe-area-inset-bottom, 0px));
    }
    .ft-cookie-consent__inner {
        flex-direction: column;
        align-items: flex-start;
        gap: 10px;
        padding: 12px;
    }
    .ft-cookie-consent__text {
        font-size: 13px;
    }
    .ft-cookie-consent__actions {
        width: 100%;
        flex-wrap: wrap;
    }
    .ft-cookie-consent__btn {
        flex: 1 1 auto;
    }
    .ft-cookie-consent__btn--link {
        flex: 0 0 100%;
        order: 3;
    }
    .ft-cookie-prefs__panel {
        width: 100%;
        border-radius: 14px 14px 0 0;
    }
    .ft-cookie-prefs__footer {
        flex-direction: column;
    }
}