/* ==================================================
   Flexible Consent Banner
   ================================================== */

.fcb-banner {
    position: fixed;
    z-index: 999999;
    background: var(--fcb-bg);
    color: var(--fcb-text);
    font-size: var(--fcb-font-size);
    box-shadow: 0 10px 40px rgba(0,0,0,.15);
    border-radius: 12px;
    overflow: hidden;
    animation: fcbFadeUp .25s ease;
}

.fcb-banner *,
.fcb-banner *::before,
.fcb-banner *::after {
    box-sizing: border-box;
}

/* =====================================
   Layout
   ===================================== */

#fcb-consent-banner {
    font-size: var(--fcb-font-size) !important;
    color: var(--fcb-text) !important;
}

#fcb-consent-banner .fcb-content h2 {
    color: var(--fcb-text) !important;
    font-size: 1.4em !important;
    line-height: 1.2 !important;
}

#fcb-consent-banner .fcb-content p,
#fcb-consent-banner .fcb-category p,
#fcb-consent-banner .fcb-category strong {
    color: var(--fcb-text) !important;
}

.fcb-banner-inner {
    padding: 24px;
}

#fcb-consent-banner .fcb-content h2 {
    margin: 0 0 12px;
    font-size: 1.5em;
    line-height: 1.2;
    color: inherit;
}

#fcb-consent-banner .fcb-content p {
    margin: 0;
    line-height: 1.6;
    color: inherit;
}


.fcb-category-count {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-width: 22px;
    height: 22px;
    padding:2px;
    border-radius: 999px;
    background: #e9e9e9;
    font-size: 11px;
    font-weight: 600;
    line-height: 1;
}


/* =====================================
   Buttons
   ===================================== */

.fcb-actions {
    display: flex;
    flex-wrap: wrap;
    gap: 12px;
    margin-top: 24px;
}

#fcb-consent-banner .fcb-button {
    appearance: none;
    background: var(--fcb-button-bg) !important;
    color: var(--fcb-button-text) !important;
    border: var(--fcb-button-border-width) solid var(--fcb-button-border) !important;
    border-radius: var(--fcb-button-radius) !important;
    font-size: var(--fcb-button-font-size) !important;
    font-weight: 600;
    padding: 12px 20px;
    cursor: pointer;
    text-decoration: none;
    box-shadow: none;
    transition: all .2s ease;
    text-transform:capitalize;
}
#fcb-consent-banner .fcb-button:hover,
#fcb-consent-banner .fcb-button:focus {
    background: var(--fcb-button-hover-bg) !important;
    color: var(--fcb-button-text) !important;
    border-color: var(--fcb-button-border) !important;
    transform: translateY(-1px);
    box-shadow: none;
}

#fcb-consent-banner .fcb-button,
#fcb-consent-banner button.fcb-button,
#fcb-consent-banner .fcb-button:hover,
#fcb-consent-banner .fcb-button:focus,
#fcb-consent-banner .fcb-button:active {
    appearance: none !important;
    -webkit-appearance: none !important;

    display: inline-flex !important;
    align-items: center !important;
    justify-content: center !important;

    width: auto !important;
    min-width: 0 !important;
    height: auto !important;
    min-height: 0 !important;

    padding: 12px 20px !important;
    margin: 0 !important;

    line-height: 1.2 !important;
    text-align: center !important;

    box-shadow: none !important;
    transform: none !important;
}

#fcb-consent-banner .fcb-about-content p {
    margin: 0 0 16px 0 !important;
    padding: 0 !important;

    color: inherit !important;

    line-height: 1.6 !important;
    font-size: inherit !important;
}

#fcb-consent-banner .fcb-about-content ul,
#fcb-consent-banner .fcb-about-content ol {
    margin: 0 0 16px 20px !important;
    padding: 0 !important;
}

#fcb-consent-banner .fcb-about-content li {
    margin: 0 0 8px 0 !important;
    line-height: 1.6 !important;
}

.fcb-cookie-settings-button {
    display: inline-flex !important;
    align-items: center !important;
    justify-content: center !important;
    width: auto !important;
    min-width: 0 !important;
    max-width: 100% !important;
    min-height: auto !important;
    height: auto !important;
    line-height: 1.2 !important;
    text-decoration: none !important;
    text-align: center !important;
    box-shadow: none !important;
    white-space: normal !important;
    appearance: none !important;
}

.fcb-cookie-settings-button:hover,
.fcb-cookie-settings-button:focus {
    text-decoration: none !important;
    box-shadow: none !important;
}

.fcb-cookie-settings-button:focus-visible {
    outline: 2px solid currentColor !important;
    outline-offset: 3px !important;
}

.fcb-settings-card,
.fcb-admin-category,
.fcb-script-item,
.fcb-preset-toolbar,
.fcb-admin-submit-area {
    width: 100%;
}


/* =====================================
   Position Styles
   ===================================== */

/* Left */

.fcb-position-left {
    left: 24px;
    bottom: 24px;
    width: min(500px, calc(100vw - 48px));
}

/* Right */

.fcb-position-right {
    right: 24px;
    bottom: 24px;
    width: min(500px, calc(100vw - 48px));
}

/* Center */

.fcb-position-center {
    left: 50%;
    bottom: 24px;
    transform: translateX(-50%);
    width: min(760px, calc(100vw - 48px));
}

/* Full Width */

.fcb-position-full {
    left: 0;
    right: 0;
    bottom: 0;
    width: 100%;
    border-radius: 0;
}

.fcb-position-full .fcb-banner-inner {
    max-width: 1440px;
    margin: 0 auto;
}

/* =====================================
   Preferences Panel
   ===================================== */

.fcb-preferences {
    margin-top: 24px;
    border-top: 1px solid rgba(0,0,0,.12);
    padding-top: 20px;
}

.fcb-category {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 20px;
    padding: 16px 0;
    border-bottom: 1px solid rgba(0,0,0,.1);
}

#fcb-consent-banner .fcb-category strong {
    display: block;
    font-size: 1em;
    color: inherit;
}

#fcb-consent-banner .fcb-category p {
    margin: 0;
    font-size: .9em;
    line-height: 1.5;
    color: inherit;
    opacity: .82;
}

.fcb-preference-actions {
    margin-top: 20px;
}

/* =====================================
   Toggle Switches
   ===================================== */

.fcb-toggle {
    position: relative;
    display: inline-flex;
    flex: 0 0 auto;
    width: 52px;
    height: 30px;
    cursor: pointer;
}

.fcb-toggle input {
    position: absolute;
    opacity: 0;
    pointer-events: none;
}

.fcb-toggle span {
    position: absolute;
    inset: 0;
    border-radius: 999px;
    background: #d7d7d7;
    transition: background .2s ease;
}

.fcb-toggle span::before {
    content: "";
    position: absolute;
    width: 24px;
    height: 24px;
    left: 3px;
    top: 3px;
    border-radius: 50%;
    background: #ffffff;
    box-shadow: 0 2px 6px rgba(0,0,0,.2);
    transition: transform .2s ease;
}

.fcb-toggle input:checked + span {
    background: var(--fcb-primary);
}

.fcb-toggle input:checked + span::before {
    transform: translateX(22px);
}

.fcb-toggle input:disabled + span {
    opacity: .7;
    cursor: not-allowed;
}

#fcb-consent-banner .fcb-about-content h3 {
    margin: 0 0 12px 0 !important;
    padding: 0 !important;

    color: var(--fcb-text) !important;

    font-size: 1.4em !important;
    font-weight: 700 !important;
    line-height: 1.2 !important;

    letter-spacing: normal !important;
    text-transform: none !important;

    border: 0 !important;
    background: transparent !important;

    font-family: inherit !important;
}

#fcb-consent-banner .fcb-about-content {
    max-width: 100%;
    line-height: 1.6;
    color: var(--fcb-text) !important;
}

#fcb-consent-banner .fcb-about-content p,
#fcb-consent-banner .fcb-about-content li {
    color: inherit !important;
}

#fcb-consent-banner .fcb-about-content a {
    color: var(--fcb-primary) !important;
    text-decoration: underline !important;
    text-underline-offset: 2px;
}

#fcb-consent-banner .fcb-about-content h1,
#fcb-consent-banner .fcb-about-content h2,
#fcb-consent-banner .fcb-about-content h4,
#fcb-consent-banner .fcb-about-content h5,
#fcb-consent-banner .fcb-about-content h6 {
    color: var(--fcb-text) !important;
    line-height: 1.3 !important;
    margin: 0 0 12px 0 !important;
}


#fcb-consent-banner .fcb-category {
    align-items: center !important;
    padding: 16px 0 !important;
    gap: 20px !important;
}

#fcb-consent-banner .fcb-category > div {
    display: block !important;
    flex: 1 1 auto !important;
    min-width: 0 !important;
}

#fcb-consent-banner .fcb-category-header {
    margin: 0 0 8px 0 !important;
    padding: 0 !important;
}

#fcb-consent-banner .fcb-category-title,
#fcb-consent-banner .fcb-category-title strong {
    display: inline-flex !important;
    align-items: center !important;
    margin: 0 !important;
    padding: 0 !important;
    line-height: 1.2 !important;
}

#fcb-consent-banner .fcb-category p {
    margin: 0 !important;
    padding: 0 !important;
    line-height: 1.5 !important;
}

/* =====================================
   Accordions
   ===================================== */

.fcb-category-header {
    display: flex;
    align-items: center;
    gap: 12px;
    margin-bottom: 8px;
}

.fcb-category-expand,
.fcb-category-expand:hover,
.fcb-category-expand:focus,
.fcb-category-expand:active {
    appearance: none;
    -webkit-appearance: none;
    position: relative;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    flex: 0 0 28px;
    width: 28px;
    height: 28px;
    min-width: 28px;
    min-height: 28px;
    padding: 0 !important;
    margin: 0 !important;
    border: 0 !important;
    border-radius: 0 !important;
    background: transparent !important;
    box-shadow: none !important;
    color: #111111 !important;
    line-height: 1 !important;
    cursor: pointer;
    transform: none !important;
    overflow: hidden;
}

#fcb-consent-banner .fcb-category-expand,
#fcb-consent-banner .fcb-category-expand:hover,
#fcb-consent-banner .fcb-category-expand:focus,
#fcb-consent-banner .fcb-category-expand:active {
    display: inline-flex !important;
    align-items: center;
    justify-content: center;
    flex: 0 0 28px;
    width: 28px;
    height: 28px;
    padding: 0 !important;
    margin: 0 !important;
    border: 0 !important;
    background: transparent !important;
    box-shadow: none !important;
    color: #111 !important;
    transform: none !important;
}


.fcb-category-expand::before,
.fcb-category-expand::after {
    content: none !important;
}

.fcb-expand-icon,
.fcb-expand-icon:hover,
.fcb-expand-icon:focus,
.fcb-expand-icon:active {
    display: block;
    width: 10px;
    height: 10px;
    background: transparent !important;
    box-shadow: none !important;
    border: 0 !important;
    border-right: 3px solid #111111 !important;
    border-bottom: 3px solid #111111 !important;
    box-sizing: border-box;
    color: #111111 !important;
    transform: rotate(45deg);
    transform-origin: center center;
    transition: transform .2s ease;
}

.fcb-expand-icon::before,
.fcb-expand-icon::after {
    content: none !important;
}

.fcb-category-expand[aria-expanded="true"] .fcb-expand-icon {
    transform: rotate(-135deg);
}

.fcb-script-list {
    margin-top: 14px;
    padding: 14px 16px;
    border-radius: 10px;
    border:1px solid;
    border-color: rgba(0, 0, 0, 0.09);
}

.fcb-script-detail strong {
    display: block;
    font-size: 14px;
    margin-bottom: 4px;
}

.fcb-script-detail p {
    margin: 0;
    font-size: 13px;
    opacity: 0.8;
}

.fcb-script-detail + .fcb-script-detail {
    margin-top: 12px;
    padding-top: 12px;
    border-top: 1px solid rgba(0, 0, 0, 0.12);
}


/* Scroll Fix */
.fcb-position-center .fcb-banner-inner {
    max-height: calc(100vh - 32px);
    overflow-y: auto;
    -webkit-overflow-scrolling: touch;
}

/* =====================================
   Mobile Preferences
   ===================================== */

@media (max-width: 767px) {
    .fcb-category {
        align-items: flex-start;
    }

    .fcb-toggle {
        margin-top: 2px;
    }
    .fcb-position-center .fcb-banner-inner {
        max-height: calc(100dvh - 24px);
        overflow-y: auto;
    }
    
}

/* =====================================
   Mobile
   ===================================== */

@media (max-width: 767px) {

    .fcb-position-left,
    .fcb-position-right,
    .fcb-position-center {
        left: 16px;
        right: 16px;
        bottom: 16px;
        width: auto;
        transform: none;
    }

    .fcb-banner-inner {
        padding: 20px;
    }

    .fcb-actions {
        flex-direction: column;
    }

    .fcb-button {
        width: 100%;
    }
}

/* =====================================
   Hidden State
   ===================================== */

.fcb-hidden {
    display: none !important;
}

/* =====================================
   Animation
   ===================================== */

@keyframes fcbFadeUp {
    from {
        opacity: 0;
        transform: translateY(12px);
    }

    to {
        opacity: 1;
        transform: translateY(0);
    }
}