.gjci-root [hidden] {
    display: none !important;
}

.gjci-root {
    position: fixed;
    left: 16px;
    right: 16px;
    bottom: 16px;
    z-index: 999999;
    color: #1f2937;
    font-family: "Sora", -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
    pointer-events: none;
}

.gjci-root--bottom-left,
.gjci-root--bottom-right,
.gjci-root--bottom-center {
    left: 16px;
    right: 16px;
    bottom: 16px;
    transform: none;
}

.gjci-banner,
.gjci-panel,
.gjci-badge,
.gjci-open-preferences {
    font: inherit;
    pointer-events: auto;
}

/* ==========================================================================
   Cookie Banner Card - Standard Marity Theme Styling
   ========================================================================== */
.gjci-banner {
    position: relative;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 20px;
    width: min(1080px, calc(100vw - 32px));
    margin: 0 auto;
    padding: 14px 44px 14px 20px;
    border: 1px solid #e5e7eb;
    border-radius: 8px;
    background: #ffffff;
    color: #1f2937;
    box-shadow: 0 8px 24px -4px rgba(14, 32, 42, 0.12), 0 3px 8px -2px rgba(14, 32, 42, 0.06);
}

.gjci-banner__content {
    flex: 1 1 auto;
    min-width: 0;
}

.gjci-banner__description {
    margin: 0;
    font-size: 13.5px;
    line-height: 1.5;
    color: #374151;
}

.gjci-banner__description a {
    color: #0e202a;
    font-weight: 600;
    text-decoration: underline;
    text-underline-offset: 3px;
    transition: color 0.15s ease;
}

.gjci-banner__description a:hover {
    color: #0d6efd;
}

.gjci-banner__actions {
    display: flex;
    align-items: center;
    justify-content: flex-end;
    gap: 8px;
    flex: 0 0 auto;
    flex-wrap: nowrap;
}

/* ==========================================================================
   Buttons - Marity Theme Spec (Crisp 8px radius, refined sizing)
   ========================================================================== */
.gjci-btn,
.gjci-open-preferences,
.gjci-badge,
.gjci-panel__close,
.gjci-banner__close,
.gjci-banner__settings {
    appearance: none;
    border: 0;
    cursor: pointer;
    font: inherit;
}

.gjci-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-height: 36px;
    border-radius: 8px;
    padding: 8px 16px;
    font-size: 13px;
    font-weight: 500;
    line-height: 1.25;
    letter-spacing: 0.01em;
    white-space: nowrap;
    text-decoration: none;
    outline: none;
    transition: color 0.2s ease, background-color 0.2s ease, border-color 0.2s ease, box-shadow 0.2s ease;
}

/* Primary Button (Marity Dark #0e202a) */
.gjci-btn--primary {
    background-color: #0e202a;
    color: #ffffff;
    border: 1px solid #0e202a;
}

.gjci-btn--primary:hover {
    background-color: #1e3646;
    border-color: #1e3646;
    color: #ffffff;
}

/* Ghost / Secondary Button (Marity Clean Outlined) */
.gjci-btn--ghost {
    background-color: #ffffff;
    color: #0e202a;
    border: 1px solid #d1d5db;
}

.gjci-btn--ghost:hover {
    background-color: #f8fafc;
    border-color: #0e202a;
    color: #0e202a;
}

/* Customize Link Button */
.gjci-banner__settings {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 5px;
    min-height: 36px;
    padding: 6px 10px;
    background: transparent;
    color: #4b5563;
    font-size: 13px;
    font-weight: 500;
    white-space: nowrap;
    border-radius: 6px;
    transition: color 0.15s ease, background-color 0.15s ease;
}

.gjci-banner__settings:hover {
    color: #0e202a;
    background-color: #f3f4f6;
}

/* Close Banner Button */
.gjci-banner__close {
    position: absolute;
    top: 10px;
    right: 10px;
    z-index: 2;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 26px;
    height: 26px;
    padding: 0 !important;
    border-radius: 6px;
    background: transparent;
    color: #9ca3af;
    font-size: 18px;
    line-height: 1;
    transition: background-color 0.15s ease, color 0.15s ease;
}

.gjci-banner__close:hover,
.gjci-panel__close:hover {
    background: #f3f4f6;
    color: #111827;
}

/* ==========================================================================
   Preferences Panel (Modal)
   ========================================================================== */
.gjci-panel {
    width: min(520px, calc(100vw - 32px));
    max-height: calc(100vh - 32px);
    margin-left: 0;
    padding: 22px;
    border: 1px solid #e5e7eb;
    border-radius: 10px;
    background: #ffffff;
    color: #1f2937;
    box-shadow: 0 16px 45px rgba(14, 32, 42, 0.16);
    overflow-y: auto;
}

.gjci-panel__header {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 16px;
}

.gjci-panel__eyebrow {
    margin-bottom: 4px;
    font-size: 10px;
    font-weight: 700;
    letter-spacing: 0.1em;
    text-transform: uppercase;
    color: #6b7280;
}

.gjci-panel__title {
    margin: 0;
    font-size: 20px;
    font-weight: 600;
    line-height: 1.25;
    color: #0e202a;
    font-family: "Prata", serif;
}

.gjci-panel__close {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 26px;
    height: 26px;
    padding: 0 !important;
    border-radius: 6px;
    background: #f3f4f6;
    color: #6b7280;
    font-size: 18px;
    line-height: 1;
    transition: background-color 0.15s ease, color 0.15s ease;
}

.gjci-panel__description,
.gjci-option__copy p {
    margin: 8px 0 0;
    font-size: 13px;
    line-height: 1.55;
    color: #4b5563;
}

.gjci-option {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 14px;
    margin-top: 10px;
    padding: 12px 14px;
    border: 1px solid #e5e7eb;
    border-radius: 8px;
    background: #f9fafb;
}

.gjci-option__copy {
    flex: 1 1 auto;
}

.gjci-option__copy strong {
    display: block;
    font-size: 13.5px;
    font-weight: 600;
    color: #111827;
}

.gjci-option__copy p {
    margin-top: 3px;
}

.gjci-chip {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-height: 24px;
    padding: 3px 9px;
    border-radius: 4px;
    background: #e2e8f0;
    color: #334155;
    font-size: 11.5px;
    font-weight: 600;
    white-space: nowrap;
}

.gjci-switch {
    position: relative;
    flex: 0 0 auto;
}

.gjci-switch input {
    position: absolute;
    inset: 0;
    opacity: 0;
    cursor: pointer;
}

.gjci-switch__track {
    position: relative;
    display: inline-block;
    width: 44px;
    height: 24px;
    border-radius: 999px;
    background: rgba(148, 163, 184, 0.4);
    transition: background-color 0.18s ease;
}

.gjci-switch__track::after {
    content: "";
    position: absolute;
    top: 3px;
    left: 3px;
    width: 18px;
    height: 18px;
    border-radius: 50%;
    background: #ffffff;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.2);
    transition: transform 0.18s ease;
}

.gjci-switch input:checked + .gjci-switch__track {
    background: #0e202a;
}

.gjci-switch input:checked + .gjci-switch__track::after {
    transform: translateX(20px);
}

.gjci-panel__footer {
    margin-top: 16px;
    padding-top: 14px;
    border-top: 1px solid #f1f5f9;
}

.gjci-panel__links {
    display: flex;
    flex-wrap: wrap;
    gap: 12px;
}

.gjci-panel__links a {
    color: #0e202a;
    font-size: 12.5px;
    font-weight: 500;
    text-decoration: underline;
    text-underline-offset: 3px;
}

.gjci-panel__links a:hover {
    color: #0d6efd;
}

.gjci-panel__actions {
    display: flex;
    gap: 8px;
    margin-top: 14px;
}

.gjci-panel__actions .gjci-btn {
    flex: 1 1 0;
    min-width: 0;
    min-height: 36px;
    font-size: 13px;
}

/* ==========================================================================
   Persistent Badge Trigger
   ========================================================================== */
.gjci-badge {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 38px;
    height: 38px;
    min-width: 38px;
    min-height: 38px;
    margin-top: 8px;
    margin-left: 0;
    padding: 8px !important;
    border: 1px solid #e5e7eb;
    border-radius: 8px;
    background: #ffffff;
    color: #0e202a;
    box-shadow: 0 4px 14px rgba(14, 32, 42, 0.12);
    transition: transform 0.18s ease, box-shadow 0.18s ease, background-color 0.18s ease;
}

.gjci-badge:hover {
    transform: translateY(-1px);
    box-shadow: 0 6px 18px rgba(14, 32, 42, 0.16);
    background-color: #f8fafc;
}

.gjci-badge__icon {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 20px;
    height: 20px;
    flex: 0 0 20px;
}

.gjci-badge__icon svg {
    display: block;
    width: 100%;
    height: 100%;
}

.gjci-badge__label {
    position: absolute;
    width: 1px;
    height: 1px;
    padding: 0;
    margin: -1px;
    overflow: hidden;
    clip: rect(0, 0, 0, 0);
    white-space: nowrap;
    border: 0;
}

.gjci-open-preferences {
    border: 1px solid #d1d5db;
    border-radius: 8px;
    padding: 8px 14px;
    background: #ffffff;
    color: #0e202a;
    font-size: 13px;
    font-weight: 500;
    transition: all 0.15s ease;
}

.gjci-open-preferences:hover {
    border-color: #0e202a;
    background: #f8fafc;
}

/* ==========================================================================
   Responsive Adaptations
   ========================================================================== */
@media (max-width: 991px) {
    .gjci-banner {
        flex-direction: column;
        align-items: stretch;
        gap: 12px;
        padding: 14px 38px 14px 16px;
    }

    .gjci-banner__content {
        width: 100%;
    }

    .gjci-banner__actions {
        width: 100%;
        justify-content: flex-start;
        flex-wrap: wrap;
        gap: 8px;
    }
}

@media (max-width: 640px) {
    .gjci-root,
    .gjci-root--bottom-left,
    .gjci-root--bottom-right,
    .gjci-root--bottom-center {
        left: 10px;
        right: 10px;
        bottom: 10px;
    }

    .gjci-banner,
    .gjci-panel {
        width: 100%;
        max-width: 100%;
    }

    .gjci-banner {
        padding: 14px 34px 14px 14px;
        border-radius: 8px;
        gap: 12px;
    }

    .gjci-banner__description {
        font-size: 12.5px;
        line-height: 1.45;
    }

    .gjci-banner__actions {
        flex-direction: column;
        align-items: stretch;
        gap: 6px;
    }

    .gjci-btn {
        width: 100%;
        min-height: 36px;
        padding: 8px 12px;
        font-size: 12.5px;
        text-align: center;
    }

    .gjci-banner__settings {
        width: 100%;
        justify-content: center;
        min-height: 32px;
        font-size: 12.5px;
    }

    .gjci-panel {
        padding: 16px;
        border-radius: 8px;
    }

    .gjci-panel__title {
        font-size: 18px;
    }

    .gjci-panel__actions {
        flex-direction: column;
        gap: 6px;
    }

    .gjci-option {
        align-items: flex-start;
        gap: 10px;
    }

    .gjci-chip,
    .gjci-switch {
        margin-top: 2px;
    }
}

@media (max-height: 760px) {
    .gjci-panel {
        max-height: calc(100vh - 16px);
    }
}