/* Apexaio Cookie Consent Banner - v1.1.0 */

/* -------------------------------------------------------
   CSS Variables (set via PHP inline style block)
------------------------------------------------------- */
:root {
    --acc-bg:             #1a1a2e;
    --acc-text:           #ffffff;
    --acc-accept-bg:      #7c3aed;
    --acc-accept-color:   #ffffff;
    --acc-accept-hover:   #6d28d9;
    --acc-decline-color:  #ffffff;
    --acc-decline-hover:  rgba(255,255,255,.15);
    --acc-link-color:     #a78bfa;
}

/* -------------------------------------------------------
   Base banner — hidden via opacity only, never display:none
------------------------------------------------------- */
.acc-banner {
    position: fixed;
    z-index: 999999;
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
    font-size: 14px;
    line-height: 1.5;
    max-width: 360px;
    background: var(--acc-bg);
    color: var(--acc-text);
    border-radius: 14px;
    box-shadow: 0 8px 40px rgba(0,0,0,.30), 0 2px 12px rgba(0,0,0,.15);
    opacity: 0;
    pointer-events: none;
    transform: translateY(20px);
    transition: opacity .35s ease, transform .35s ease;
}

/* Positions */
.acc-banner.acc-bottom-left  { bottom: 24px; left: 24px; }
.acc-banner.acc-bottom-right { bottom: 24px; right: 24px; }
.acc-banner.acc-bottom-bar,
.acc-banner.acc-top-bar {
    max-width: 100%; width: 100%;
    left: 0; right: 0; border-radius: 0;
}
.acc-banner.acc-bottom-bar { bottom: 0; }
.acc-banner.acc-top-bar    { top: 0; }

/* Inner */
.acc-banner__inner { padding: 20px 20px 16px; }

.acc-banner__logo {
    display: flex; align-items: center; gap: 8px;
    margin-bottom: 12px; opacity: .85;
}
.acc-banner__brand {
    font-size: 11px; font-weight: 600;
    letter-spacing: .06em; text-transform: uppercase;
}
.acc-banner__title {
    margin: 0 0 8px; font-size: 15px; font-weight: 700;
    color: var(--acc-text);
}
.acc-banner__text {
    margin: 0 0 16px; font-size: 13px;
    color: var(--acc-text); opacity: .85;
}
.acc-link {
    color: var(--acc-link-color);
    text-decoration: underline; white-space: nowrap;
}

/* Buttons */
.acc-banner__actions { display: flex; gap: 8px; flex-wrap: wrap; }
.acc-btn {
    display: inline-flex; align-items: center; justify-content: center;
    padding: 10px 18px; border-radius: 8px;
    font-size: 13px; font-weight: 600; cursor: pointer;
    border: 1.5px solid transparent;
    transition: background .2s ease, color .2s ease, border-color .2s ease, transform .1s ease;
    flex: 1; min-width: 110px; letter-spacing: .02em;
}
.acc-btn:active { transform: scale(.97); }

.acc-btn--accept {
    background: var(--acc-accept-bg);
    color: var(--acc-accept-color);
    border-color: var(--acc-accept-bg);
}
.acc-btn--accept:hover {
    background: var(--acc-accept-hover);
    border-color: var(--acc-accept-hover);
}
.acc-btn--decline {
    background: transparent;
    color: var(--acc-decline-color);
    border-color: rgba(255,255,255,.3);
}
.acc-btn--decline:hover {
    background: var(--acc-decline-hover);
    border-color: rgba(255,255,255,.5);
}

/* Footer */
.acc-banner__footer {
    margin-top: 12px; padding-top: 10px;
    border-top: 1px solid rgba(255,255,255,.12); text-align: center;
}
.acc-settings-link {
    font-size: 11px; color: var(--acc-text);
    opacity: .6; text-decoration: underline; transition: opacity .2s;
}
.acc-settings-link:hover { opacity: 1; }

/* Bar layout */
.acc-bottom-bar .acc-banner__inner,
.acc-top-bar    .acc-banner__inner {
    display: flex; align-items: center; justify-content: space-between;
    gap: 16px; flex-wrap: wrap; padding: 14px 24px;
}
.acc-bottom-bar .acc-banner__logo,
.acc-top-bar    .acc-banner__logo { margin-bottom: 0; }
.acc-bottom-bar .acc-banner__title,
.acc-top-bar    .acc-banner__title { margin: 0; font-size: 14px; }
.acc-bottom-bar .acc-banner__text,
.acc-top-bar    .acc-banner__text  { margin: 0; flex: 1; }
.acc-bottom-bar .acc-banner__actions,
.acc-top-bar    .acc-banner__actions { flex-wrap: nowrap; }

/* -------------------------------------------------------
   PILL STATE
   - Peeks at edge of screen
   - Slides in on hover to reveal label
   - Click expands to full banner
------------------------------------------------------- */
.acc-banner.acc-pill {
    max-width: unset !important;
    width: auto !important;
    border-radius: 0 50px 50px 0 !important; /* flat on left, rounded on right */
    cursor: pointer;
    box-shadow: 4px 4px 20px rgba(0,0,0,.25);
    /* Peek: only show a sliver */
    transition: transform .3s cubic-bezier(.34,1.56,.64,1), opacity .3s ease, box-shadow .2s ease !important;
}

/* Bottom-left pill peeks from left edge */
.acc-banner.acc-bottom-left.acc-pill {
    left: 0 !important;
    bottom: 32px !important;
    border-radius: 0 50px 50px 0 !important;
    transform: translateX(calc(-100% + 18px)) !important; /* peek 18px */
}
.acc-banner.acc-bottom-left.acc-pill:hover {
    transform: translateX(0) !important;
}

/* Bottom-right pill peeks from right edge */
.acc-banner.acc-bottom-right.acc-pill {
    right: 0 !important;
    left: auto !important;
    bottom: 32px !important;
    border-radius: 50px 0 0 50px !important;
    transform: translateX(calc(100% - 18px)) !important;
}
.acc-banner.acc-bottom-right.acc-pill:hover {
    transform: translateX(0) !important;
}

/* Bar variants → left edge pill */
.acc-banner.acc-bottom-bar.acc-pill,
.acc-banner.acc-top-bar.acc-pill {
    width: auto !important; right: auto !important;
    left: 0 !important; bottom: 32px !important; top: auto !important;
    border-radius: 0 50px 50px 0 !important;
    transform: translateX(calc(-100% + 18px)) !important;
}
.acc-banner.acc-bottom-bar.acc-pill:hover,
.acc-banner.acc-top-bar.acc-pill:hover {
    transform: translateX(0) !important;
}

/* Pill inner layout */
.acc-banner.acc-pill .acc-banner__inner {
    padding: 10px 18px 10px 14px !important;
    display: flex !important;
    align-items: center !important;
    gap: 8px !important;
    white-space: nowrap;
}

/* Hide full-banner content inside pill */
.acc-banner.acc-pill .acc-banner__title,
.acc-banner.acc-pill .acc-banner__text,
.acc-banner.acc-pill .acc-banner__actions,
.acc-banner.acc-pill .acc-banner__footer { display: none !important; }

.acc-banner.acc-pill .acc-banner__logo {
    margin-bottom: 0 !important;
    opacity: 1 !important;
    pointer-events: none;
}

/* Pill label — uses PHP-injected data attribute */
.acc-banner.acc-pill .acc-banner__logo::after {
    content: attr(data-pill-label);
    font-size: 12px;
    font-weight: 500;
    opacity: .85;
    white-space: nowrap;
    letter-spacing: .02em;
}

/* Responsive */
@media (max-width: 480px) {
    .acc-banner.acc-bottom-left:not(.acc-pill),
    .acc-banner.acc-bottom-right:not(.acc-pill) {
        left: 12px; right: 12px;
        max-width: calc(100% - 24px); bottom: 12px;
    }
    .acc-banner__actions { flex-direction: column; }
    .acc-btn { flex: unset; width: 100%; }
}
