/**
 * StackIO Cookie Consent — banner styles.
 * Clean, minimal, matches Zuzu Official aesthetic.
 */

/* ───── Overlay for center mode ───── */
.stackio-cb--center {
    position: fixed;
    inset: 0;
    z-index: 999999;
    display: flex;
    align-items: center;
    justify-content: center;
    background: rgba(0, 0, 0, 0.45);
}

/* ───── Banner base ───── */
.stackio-cb--bottom {
    position: fixed;
    bottom: 0;
    left: 0;
    right: 0;
    z-index: 999999;
}

.stackio-cb__inner {
    background: #fff;
    max-width: 560px;
    margin: 0 auto;
    padding: 28px 32px;
    font-family: "Montserrat", Arial, sans-serif;
    color: #1a1a1a;
    box-shadow: 0 -4px 24px rgba(0, 0, 0, 0.12);
    border-radius: 12px 12px 0 0;
}

.stackio-cb--center .stackio-cb__inner {
    border-radius: 12px;
    box-shadow: 0 8px 40px rgba(0, 0, 0, 0.18);
}

/* ───── Typography ───── */
.stackio-cb__title {
    font-size: 18px;
    font-weight: 700;
    margin: 0 0 10px 0;
    line-height: 1.3;
}

.stackio-cb__text {
    font-size: 13px;
    line-height: 1.55;
    color: #555;
    margin: 0 0 20px 0;
}

/* ───── Buttons ───── */
.stackio-cb__buttons {
    display: flex;
    gap: 10px;
    flex-wrap: wrap;
}

.stackio-cb__btn {
    padding: 12px 22px;
    font-size: 13px;
    font-weight: 600;
    font-family: "Montserrat", Arial, sans-serif;
    border-radius: 8px;
    cursor: pointer;
    transition: transform .15s ease, box-shadow .15s ease, background .2s ease, color .2s ease, border-color .2s ease, filter .2s ease;
    border: 1.5px solid transparent;
    line-height: 1;
}

/* Akceptuj — glowny, najbardziej zachecajacy przycisk (primary CTA) */
.stackio-cb__btn--accept {
    background: var(--cc-accent, #1a1a1a);
    color: #fff;
    border-color: var(--cc-accent, #1a1a1a);
    padding: 13px 30px;
    font-size: 14px;
    font-weight: 700;
    box-shadow: 0 6px 18px rgba(0, 0, 0, .16);
}

.stackio-cb__btn--accept:hover {
    transform: translateY(-1px);
    box-shadow: 0 10px 24px rgba(0, 0, 0, .22);
    filter: brightness(1.06);
}

/* Odrzuc — czytelny przycisk drugorzedny. Rowna wysokosc co Akceptuj
   (RODO: odrzucenie musi byc tak samo latwe jak akceptacja). */
.stackio-cb__btn--reject {
    background: #fff;
    color: #1a1a1a;
    border-color: #d8d2d4;
}

.stackio-cb__btn--reject:hover {
    border-color: #1a1a1a;
    background: #faf7f8;
}

/* Dostosuj — najcichsza akcja (ghost link) */
.stackio-cb__btn--settings {
    background: transparent;
    color: #6b5b60;
    border-color: transparent;
    text-decoration: underline;
    text-underline-offset: 3px;
    padding-left: 8px;
    padding-right: 8px;
}

.stackio-cb__btn--settings:hover {
    color: #1a1a1a;
}

.stackio-cb__btn--save {
    background: var(--cc-accent, #1a1a1a);
    color: #fff;
    border-color: var(--cc-accent, #1a1a1a);
    width: 100%;
    padding: 13px;
    font-weight: 700;
    box-shadow: 0 6px 18px rgba(0, 0, 0, .16);
}

.stackio-cb__btn--save:hover {
    transform: translateY(-1px);
    box-shadow: 0 10px 24px rgba(0, 0, 0, .22);
    filter: brightness(1.06);
}

/* ───── Category toggles ───── */
.stackio-cb__details {
    margin-top: 8px;
}

.stackio-cb__category {
    padding: 12px 0;
    border-bottom: 1px solid #eee;
}

.stackio-cb__category:last-of-type {
    border-bottom: none;
    margin-bottom: 16px;
}

.stackio-cb__category label {
    display: flex;
    align-items: center;
    gap: 8px;
    cursor: pointer;
    font-size: 14px;
}

.stackio-cb__category label strong {
    font-weight: 600;
}

.stackio-cb__category p {
    font-size: 12px;
    color: #777;
    margin: 4px 0 0 26px;
    line-height: 1.4;
}

.stackio-cb__category input[type="checkbox"] {
    width: 18px;
    height: 18px;
    accent-color: #1a1a1a;
    cursor: pointer;
}

/* ───── Animation ───── */
.stackio-cb--bottom {
    animation: stackio-cb-slideup 0.35s ease-out;
}

.stackio-cb--center {
    animation: stackio-cb-fadein 0.25s ease-out;
}

@keyframes stackio-cb-slideup {
    from { transform: translateY(100%); opacity: 0; }
    to   { transform: translateY(0);    opacity: 1; }
}

@keyframes stackio-cb-fadein {
    from { opacity: 0; }
    to   { opacity: 1; }
}

/* ───── Mobile ───── */
@media (max-width: 600px) {
    .stackio-cb__inner {
        padding: 20px;
        max-width: 100%;
        border-radius: 12px 12px 0 0;
    }
    .stackio-cb__buttons {
        flex-direction: column-reverse;
    }
    .stackio-cb__btn {
        width: 100%;
        text-align: center;
    }
    .stackio-cb__title {
        font-size: 16px;
    }
}

/* ───── Re-open trigger ("Ustawienia cookies") ───── */
.stackio-cc-reopen {
    position: fixed;
    left: 18px;
    bottom: 18px;
    z-index: 999998;
    width: 42px;
    height: 42px;
    padding: 0;
    border-radius: 50%;
    border: 1px solid rgba(0, 0, 0, .08);
    background: #fff;
    color: var(--cc-accent, #1a1a1a);
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    box-shadow: 0 6px 20px rgba(0, 0, 0, .12);
    opacity: .6;
    transition: opacity .2s ease, transform .2s ease;
}
.stackio-cc-reopen:hover {
    opacity: 1;
    transform: translateY(-2px);
}
.stackio-cc-reopen:focus-visible {
    outline: 2px solid var(--cc-accent, #1a1a1a);
    outline-offset: 2px;
    opacity: 1;
}
@media (max-width: 600px) {
    .stackio-cc-reopen {
        width: 38px;
        height: 38px;
        left: 12px;
        bottom: 12px;
    }
    /* Kolko zaslanialo cene w lewym kafelku siatki; gdy stopka ma link do ustawien, wystarczy on. */
    body:has([data-stackio-cookie-settings]) .stackio-cc-reopen {
        display: none;
    }
}
