/* ==========================================================================
   AIO Business Toolkit — Cookie Consent Banner
   ========================================================================== */

.aio-cookie-banner {
    position: fixed;
    left: 0; right: 0;
    z-index: 99999;
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
}

.aio-cookie-bottom { bottom: 0; }
.aio-cookie-top    { top: 0; }

/* Popup style */
.aio-cookie-style-popup {
    inset: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    background: rgba(0, 0, 0, calc(var(--aio-ck-overlay, 50) / 100));
}

.aio-cookie-style-popup .aio-cookie-inner {
    max-width: 540px;
    border-radius: 12px;
    flex-direction: column;
    gap: 16px;
}

/* Floating style */
.aio-cookie-style-floating {
    bottom: 24px;
    left: 24px;
    right: auto;
    max-width: 400px;
    border-radius: 12px;
    overflow: hidden;
}

/* ── Inner wrapper (reads CSS vars set by PHP) ── */
.aio-cookie-inner {
    background: var(--aio-ck-bg, #1f2937);
    color: var(--aio-ck-text, #f3f4f6);
    font-size: calc(var(--aio-ck-font-size, 14) * 1px);
    padding: 20px 24px;
    max-width: 1200px;
    margin: 0 auto;
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 16px;
    box-shadow: 0 -4px 20px rgba(0, 0, 0, .15);
}

.aio-cookie-style-popup .aio-cookie-inner,
.aio-cookie-style-floating .aio-cookie-inner {
    max-width: 100%;
    margin: 0;
    box-shadow: 0 8px 32px rgba(0, 0, 0, .25);
}

.aio-cookie-text {
    flex: 1;
    min-width: 280px;
}

.aio-cookie-text p {
    margin: 0;
    font-size: inherit;
    line-height: 1.6;
    color: var(--aio-ck-text, #d1d5db);
}

.aio-cookie-text a {
    color: var(--aio-ck-link, #93c5fd);
    text-decoration: underline;
}

/* ── Category toggles ── */
.aio-cookie-categories {
    width: 100%;
    display: flex;
    flex-wrap: wrap;
    gap: 12px;
    padding: 16px 0 8px;
    border-top: 1px solid rgba(255, 255, 255, .1);
}

.aio-cookie-category {
    display: flex;
    align-items: flex-start;
    gap: 8px;
    background: var(--aio-ck-cat-bg, rgba(255, 255, 255, .06));
    padding: 10px 14px;
    border-radius: calc(var(--aio-ck-cat-radius, 8) * 1px);
    cursor: pointer;
    min-width: 200px;
    flex: 1;
}

.aio-cookie-category input[type="checkbox"] {
    margin-top: 3px;
    accent-color: var(--aio-ck-accept-bg, #4f46e5);
    width: 16px;
    height: 16px;
    flex-shrink: 0;
}

.aio-cookie-category strong {
    display: block;
    font-size: 13px;
    color: var(--aio-ck-text, #f9fafb);
}

.aio-cookie-category em {
    font-size: 11px;
    color: rgba(255, 255, 255, .5);
    font-style: normal;
}

.aio-cookie-category small {
    font-size: 11px;
    color: rgba(255, 255, 255, .5);
    line-height: 1.3;
}

/* ── Buttons ── */
.aio-cookie-buttons {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    align-items: center;
}

.aio-cookie-btn {
    padding: 10px 20px;
    font-size: 13px;
    font-weight: 600;
    border: none;
    border-radius: calc(var(--aio-ck-radius, 8) * 1px);
    cursor: pointer;
    transition: filter .15s, transform .1s;
    white-space: nowrap;
}

.aio-cookie-btn:hover  { filter: brightness(1.1); }
.aio-cookie-btn:active { transform: scale(.97); }

.aio-cookie-accept {
    background: var(--aio-ck-accept-bg, #4f46e5);
    color: var(--aio-ck-accept-color, #fff);
}

.aio-cookie-reject {
    background: var(--aio-ck-reject-bg, rgba(255, 255, 255, .1));
    color: var(--aio-ck-reject-color, #d1d5db);
    border: 1px solid rgba(255, 255, 255, .2);
}

.aio-cookie-settings {
    background: transparent;
    color: var(--aio-ck-link, #93c5fd);
    text-decoration: underline;
    padding: 10px 8px;
}

.aio-cookie-save {
    background: var(--aio-ck-save-bg, #22c55e);
    color: var(--aio-ck-save-color, #fff);
}

/* ── Responsive ── */
@media (max-width: 640px) {
    .aio-cookie-inner {
        flex-direction: column;
        padding: 16px;
    }

    .aio-cookie-buttons {
        width: 100%;
    }

    .aio-cookie-btn {
        flex: 1;
        text-align: center;
    }

    .aio-cookie-category {
        min-width: 100%;
    }

    .aio-cookie-style-floating {
        left: 0;
        right: 0;
        bottom: 0;
        max-width: 100%;
        border-radius: 12px 12px 0 0;
    }
}
