:root {
    --wcc-bg: #231b14;
    --wcc-text: #f3ead9;
    --wcc-accent-bg: #c19a53;
    --wcc-accent-text: #231b14;
    --wcc-secondary-text: #f3ead9;
    --wcc-secondary-border: #f3ead9;
    --wcc-radius: 10px;
    --wcc-font: inherit;
}

#wcc-banner,
#wcc-modal,
#wcc-reopen {
    font-family: var(--wcc-font);
}

#wcc-banner *,
#wcc-modal * {
    box-sizing: border-box;
}

/* Overlay per la finestra centrale */
.wcc-overlay {
    position: fixed;
    inset: 0;
    background: rgba(0, 0, 0, 0.55);
    z-index: 999998;
}

/* Banner iniziale */
#wcc-banner {
    position: fixed;
    z-index: 999999;
    background: var(--wcc-bg);
    color: var(--wcc-text);
    box-shadow: 0 -2px 24px rgba(0, 0, 0, 0.25);
}

.wcc-position-bar-bottom {
    left: 0;
    right: 0;
    bottom: 0;
}

.wcc-position-corner-left,
.wcc-position-corner-right {
    bottom: 20px;
    max-width: 380px;
    width: calc(100% - 40px);
    border-radius: var(--wcc-radius);
    box-shadow: 0 4px 24px rgba(0, 0, 0, 0.3);
}

.wcc-position-corner-left {
    left: 20px;
}

.wcc-position-corner-right {
    right: 20px;
}

.wcc-position-modal-center {
    left: 50%;
    top: 50%;
    transform: translate(-50%, -50%);
    max-width: 480px;
    width: 90%;
    border-radius: var(--wcc-radius);
    box-shadow: 0 8px 40px rgba(0, 0, 0, 0.4);
}

.wcc-banner-inner {
    padding: 22px 26px;
    display: flex;
    gap: 20px;
    align-items: center;
    flex-wrap: wrap;
}

.wcc-position-corner-left .wcc-banner-inner,
.wcc-position-corner-right .wcc-banner-inner,
.wcc-position-modal-center .wcc-banner-inner {
    flex-direction: column;
    align-items: flex-start;
}

.wcc-title {
    margin: 0 0 6px;
    font-size: 16px;
    font-weight: 600;
}

.wcc-message {
    margin: 0;
    font-size: 14px;
    line-height: 1.55;
    opacity: 0.92;
}

.wcc-message a {
    color: inherit;
    text-decoration: underline;
}

.wcc-banner-actions {
    display: flex;
    gap: 10px;
    flex-wrap: wrap;
    margin-left: auto;
}

.wcc-position-corner-left .wcc-banner-actions,
.wcc-position-corner-right .wcc-banner-actions,
.wcc-position-modal-center .wcc-banner-actions {
    margin-left: 0;
    margin-top: 12px;
    width: 100%;
}

.wcc-btn {
    border: 1px solid transparent;
    padding: 10px 18px;
    border-radius: var(--wcc-radius);
    font-size: 13px;
    font-weight: 600;
    cursor: pointer;
    white-space: nowrap;
    line-height: 1.4;
}

.wcc-btn-solid {
    background: var(--wcc-accent-bg);
    color: var(--wcc-accent-text);
}

.wcc-btn-outline {
    background: transparent;
    color: var(--wcc-secondary-text);
    border-color: var(--wcc-secondary-border);
}

/* Modale preferenze */
#wcc-modal {
    position: fixed;
    inset: 0;
    z-index: 1000000;
    display: flex;
    align-items: center;
    justify-content: center;
}

.wcc-modal-overlay {
    position: absolute;
    inset: 0;
    background: rgba(0, 0, 0, 0.55);
}

.wcc-modal-box {
    position: relative;
    background: var(--wcc-bg);
    color: var(--wcc-text);
    padding: 28px;
    max-width: 480px;
    width: 90%;
    border-radius: var(--wcc-radius);
    max-height: 85vh;
    overflow: auto;
    box-shadow: 0 8px 40px rgba(0, 0, 0, 0.4);
}

.wcc-modal-box h2 {
    margin-top: 0;
    font-size: 18px;
}

.wcc-category {
    padding: 14px 0;
    border-top: 1px solid rgba(128, 128, 128, 0.3);
}

.wcc-category:first-of-type {
    border-top: none;
}

.wcc-category-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 12px;
    font-weight: 600;
    margin-bottom: 6px;
}

.wcc-category p {
    margin: 0;
    font-size: 13px;
    opacity: 0.85;
    line-height: 1.5;
}

.wcc-switch {
    position: relative;
    display: inline-block;
    width: 42px;
    height: 24px;
    flex-shrink: 0;
}

.wcc-switch input {
    opacity: 0;
    width: 0;
    height: 0;
}

.wcc-slider {
    position: absolute;
    inset: 0;
    background: rgba(128, 128, 128, 0.4);
    border-radius: 24px;
    transition: 0.2s;
    cursor: pointer;
}

.wcc-slider::before {
    content: "";
    position: absolute;
    height: 18px;
    width: 18px;
    left: 3px;
    top: 3px;
    background: #fff;
    border-radius: 50%;
    transition: 0.2s;
}

.wcc-switch input:checked + .wcc-slider {
    background: var(--wcc-accent-bg);
}

.wcc-switch input:checked + .wcc-slider::before {
    transform: translateX(18px);
}

.wcc-switch-disabled .wcc-slider {
    opacity: 0.6;
    cursor: not-allowed;
}

.wcc-modal-actions {
    display: flex;
    justify-content: flex-end;
    gap: 10px;
    margin-top: 22px;
    flex-wrap: wrap;
}

/* Icona per riaprire le preferenze */
#wcc-reopen {
    position: fixed;
    left: 20px;
    bottom: 20px;
    z-index: 999997;
    width: 46px;
    height: 46px;
    border-radius: 50%;
    border: none;
    background: var(--wcc-accent-bg);
    color: var(--wcc-accent-text);
    font-size: 20px;
    cursor: pointer;
    box-shadow: 0 2px 12px rgba(0, 0, 0, 0.3);
    display: flex;
    align-items: center;
    justify-content: center;
}

@media (max-width: 600px) {
    .wcc-position-corner-left,
    .wcc-position-corner-right {
        left: 12px;
        right: 12px;
        max-width: none;
        width: auto;
    }

    .wcc-banner-inner {
        padding: 18px;
    }
}
