/* ─── U Post Cookie Consent Banner ──────────────────────────────── */

.ucc-overlay {
    position: fixed;
    inset: 0;
    background: rgba(0, 0, 0, .45);
    z-index: 999998;
    opacity: 0;
    transition: opacity .3s ease;
}
.ucc-overlay.ucc-visible {
    opacity: 1;
}

/* ─── Banner ──────────────────────────────────────────────────────── */

.ucc-banner {
    position: fixed;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%) scale(.96);
    z-index: 999999;
    width: 94%;
    max-width: 680px;
    max-height: 90vh;
    display: flex;
    flex-direction: column;
    border-radius: 16px;
    box-shadow: 0 24px 64px rgba(0, 0, 0, .18);
    opacity: 0;
    transition: opacity .35s ease, transform .35s ease;
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Oxygen-Sans, Ubuntu, Cantarell, "Helvetica Neue", sans-serif;
    overflow: hidden;
}
.ucc-banner.ucc-visible {
    opacity: 1;
    transform: translate(-50%, -50%) scale(1);
}

.ucc-banner-inner {
    display: flex;
    flex-direction: column;
    max-height: 90vh;
    position: relative;
}

/* ─── Close Button ────────────────────────────────────────────────── */

.ucc-close {
    position: absolute;
    top: 12px;
    right: 14px;
    background: none;
    border: none;
    font-size: 26px;
    line-height: 1;
    cursor: pointer;
    color: inherit;
    opacity: .55;
    transition: opacity .2s;
    z-index: 2;
    padding: 4px 8px;
}
.ucc-close:hover {
    opacity: 1;
}

/* ─── Header ──────────────────────────────────────────────────────── */

.ucc-header {
    padding: 28px 32px 0;
}
.ucc-header h2 {
    margin: 0;
    font-size: 20px;
    font-weight: 700;
    line-height: 1.3;
}

/* ─── Body ────────────────────────────────────────────────────────── */

.ucc-body {
    padding: 16px 32px 8px;
    overflow-y: auto;
    flex: 1 1 auto;
}
.ucc-description {
    font-size: 14px;
    line-height: 1.65;
    margin: 0 0 20px;
    opacity: .78;
}

/* ─── Category ────────────────────────────────────────────────────── */

.ucc-category {
    border: 1px solid rgba(0, 0, 0, .09);
    border-radius: 10px;
    margin-bottom: 10px;
    overflow: hidden;
    transition: border-color .2s;
}
.ucc-category:hover {
    border-color: rgba(0, 0, 0, .16);
}

.ucc-category-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 14px 18px;
    cursor: pointer;
    user-select: none;
    gap: 12px;
}

.ucc-category-left {
    display: flex;
    align-items: center;
    gap: 10px;
    flex: 1;
    min-width: 0;
}

.ucc-category-arrow {
    width: 20px;
    height: 20px;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
    transition: transform .25s ease;
}
.ucc-category-arrow svg {
    width: 12px;
    height: 12px;
    fill: currentColor;
    opacity: .45;
}
.ucc-category.ucc-expanded .ucc-category-arrow {
    transform: rotate(180deg);
}

.ucc-category-name {
    font-size: 15px;
    font-weight: 600;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

/* ─── Toggle Switch ───────────────────────────────────────────────── */

.ucc-toggle {
    position: relative;
    flex-shrink: 0;
}
.ucc-toggle input {
    position: absolute;
    opacity: 0;
    width: 0;
    height: 0;
}
.ucc-toggle-slider {
    display: block;
    width: 44px;
    height: 24px;
    background: #ccc;
    border-radius: 24px;
    cursor: pointer;
    transition: background .25s;
    position: relative;
}
.ucc-toggle-slider::after {
    content: '';
    position: absolute;
    top: 3px;
    left: 3px;
    width: 18px;
    height: 18px;
    background: #fff;
    border-radius: 50%;
    transition: transform .25s;
    box-shadow: 0 1px 3px rgba(0, 0, 0, .15);
}
.ucc-toggle input:checked + .ucc-toggle-slider {
    /* accent color set via JS */
}
.ucc-toggle input:checked + .ucc-toggle-slider::after {
    transform: translateX(20px);
}
.ucc-toggle input:disabled + .ucc-toggle-slider {
    opacity: .65;
    cursor: default;
}

.ucc-always-active {
    font-size: 13px;
    font-weight: 600;
    white-space: nowrap;
    flex-shrink: 0;
}

/* ─── Category Description ────────────────────────────────────────── */

.ucc-category-body {
    max-height: 0;
    overflow: hidden;
    transition: max-height .3s ease;
}
.ucc-category.ucc-expanded .ucc-category-body {
    max-height: 300px;
}
.ucc-category-desc {
    padding: 0 18px 16px;
    font-size: 13px;
    line-height: 1.6;
    opacity: .68;
    margin: 0;
}

/* ─── Footer ──────────────────────────────────────────────────────── */

.ucc-footer {
    display: flex;
    gap: 10px;
    padding: 16px 32px 24px;
    flex-wrap: wrap;
}
.ucc-btn {
    flex: 1 1 0;
    min-width: 120px;
    padding: 12px 18px;
    border: none;
    border-radius: 8px;
    font-size: 14px;
    font-weight: 600;
    cursor: pointer;
    transition: filter .2s, transform .15s;
    text-align: center;
    line-height: 1.3;
}
.ucc-btn:hover {
    filter: brightness(1.05);
}
.ucc-btn:active {
    transform: scale(.98);
}

.ucc-btn-reject {
    background: transparent;
    border: 2px solid rgba(0, 0, 0, .15);
}
.ucc-btn-reject:hover {
    border-color: rgba(0, 0, 0, .3);
}

.ucc-btn-save {
    /* accent with border style – set via JS */
}

.ucc-btn-accept {
    /* accent color set via JS */
}

/* ─── Privacy Link ────────────────────────────────────────────────── */

.ucc-privacy-link {
    opacity: .55;
    text-decoration: underline;
    font-size: 13px;
}
.ucc-privacy-link:hover {
    opacity: .8;
}

/* ─── Floating Re-open Button ─────────────────────────────────────── */

.ucc-floating {
    position: fixed;
    bottom: 20px;
    left: 20px;
    z-index: 999997;
    width: 48px;
    height: 48px;
    border-radius: 50%;
    border: none;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    box-shadow: 0 4px 16px rgba(0, 0, 0, .15);
    transition: transform .2s, box-shadow .2s, opacity .3s;
    opacity: 0;
}
.ucc-floating.ucc-visible {
    opacity: 1;
}
.ucc-floating:hover {
    transform: scale(1.08);
    box-shadow: 0 6px 24px rgba(0, 0, 0, .2);
}
.ucc-floating svg {
    width: 22px;
    height: 22px;
}

/* ─── Responsive ──────────────────────────────────────────────────── */

@media (max-width: 600px) {
    .ucc-banner {
        width: 100%;
        max-width: 100%;
        bottom: 0;
        top: auto;
        left: 0;
        transform: translateY(20px);
        border-radius: 20px 20px 0 0;
    }
    .ucc-banner.ucc-visible {
        transform: translateY(0);
    }
    .ucc-header {
        padding: 22px 20px 0;
    }
    .ucc-body {
        padding: 12px 20px 8px;
    }
    .ucc-footer {
        padding: 12px 20px 20px;
        flex-direction: column;
    }
    .ucc-btn {
        min-width: auto;
    }
}
