/* Cookie Consent Manager - front.css */

#ccm-banner {
    position: fixed;
    z-index: 99999;
    left: 0;
    right: 0;
    font-family: inherit, "Helvetica Neue", Arial, sans-serif;
    color: var(--ccm-text, #222);
    box-sizing: border-box;
}

#ccm-banner * {
    box-sizing: border-box;
}

#ccm-banner[hidden] {
    display: none !important;
}

/* ---------- Wariant: pasek dolny ---------- */
#ccm-banner.ccm-position-bar {
    bottom: 0;
    background: var(--ccm-bg, #fff);
    border-top: 1px solid var(--ccm-border, #e5e5e5);
    box-shadow: 0 -2px 18px rgba(0, 0, 0, 0.08);
    animation: ccm-slide-up .35s ease-out;
}

@keyframes ccm-slide-up {
    from { transform: translateY(100%); }
    to { transform: translateY(0); }
}

.ccm-position-bar .ccm-inner {
    max-width: 1280px;
    margin: 0 auto;
    padding: 18px 24px;
}

.ccm-position-bar .ccm-view {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 24px;
    flex-wrap: wrap;
}

.ccm-position-bar .ccm-content {
    flex: 1 1 420px;
    min-width: 260px;
}

.ccm-position-bar .ccm-actions {
    flex: 0 0 auto;
    display: flex;
    gap: 10px;
    flex-wrap: wrap;
}

/* ---------- Wariant: modal wysrodkowany ---------- */
.ccm-overlay {
    position: fixed;
    inset: 0;
    background: rgba(0, 0, 0, 0.5);
}

#ccm-banner.ccm-position-modal {
    top: 0;
    bottom: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 16px;
}

.ccm-position-modal .ccm-inner {
    position: relative;
    z-index: 1;
    background: var(--ccm-bg, #fff);
    border: 1px solid var(--ccm-border, #e5e5e5);
    border-radius: 12px;
    max-width: 560px;
    width: 100%;
    max-height: 90vh;
    overflow-y: auto;
    padding: 28px;
    box-shadow: 0 10px 40px rgba(0, 0, 0, 0.25);
    animation: ccm-pop-in .25s ease-out;
}

@keyframes ccm-pop-in {
    from { opacity: 0; transform: scale(.96); }
    to { opacity: 1; transform: scale(1); }
}

.ccm-position-modal .ccm-actions {
    display: flex;
    gap: 10px;
    flex-wrap: wrap;
    margin-top: 20px;
}

/* ---------- Wspolne elementy tresci ---------- */
.ccm-title {
    font-size: 16px;
    font-weight: 700;
    margin: 0 0 8px;
    color: var(--ccm-text, #222);
}

.ccm-description {
    font-size: 13.5px;
    line-height: 1.5;
    margin: 0 0 6px;
    color: var(--ccm-text, #222);
}

.ccm-description p {
    margin: 0 0 8px;
}

.ccm-legal-links {
    font-size: 12.5px;
    margin-top: 6px;
}

.ccm-legal-links a {
    color: var(--ccm-accent, #e2001a);
    text-decoration: underline;
    margin-right: 14px;
}

.ccm-footer-html {
    font-size: 12px;
    margin-top: 8px;
    opacity: .85;
}

.ccm-link-btn {
    background: none;
    border: none;
    padding: 0;
    color: var(--ccm-accent, #e2001a);
    text-decoration: underline;
    cursor: pointer;
    font: inherit;
}

/* ---------- Przyciski ---------- */
.ccm-btn {
    appearance: none;
    border: 1px solid transparent;
    border-radius: var(--ccm-radius, 24px);
    padding: 10px 20px;
    font-size: 13.5px;
    font-weight: 600;
    cursor: pointer;
    white-space: nowrap;
    transition: opacity .15s ease, transform .05s ease;
}

.ccm-btn:active {
    transform: scale(.97);
}

.ccm-btn-primary {
    background: var(--ccm-accent, #e2001a);
    color: var(--ccm-accent-text, #fff);
}

.ccm-btn-primary:hover {
    opacity: .88;
}

.ccm-btn-outline {
    background: transparent;
    color: var(--ccm-text, #222);
    border-color: var(--ccm-border, #ccc);
}

.ccm-btn-outline:hover {
    background: rgba(0, 0, 0, 0.04);
}

.ccm-btn-ghost {
    background: transparent;
    color: var(--ccm-text, #222);
    text-decoration: underline;
    border: none;
    padding: 10px 6px;
}

/* ---------- Panel ustawien / kategorie ---------- */
.ccm-view-settings .ccm-category {
    border-top: 1px solid var(--ccm-border, #e5e5e5);
    padding: 12px 0;
}

.ccm-view-settings .ccm-category:first-of-type {
    border-top: none;
}

.ccm-category-head {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
}

.ccm-category-name {
    font-weight: 600;
    font-size: 13.5px;
}

.ccm-category-desc {
    font-size: 12.5px;
    line-height: 1.45;
    margin: 6px 0 0;
    opacity: .85;
}

/* Switch (toggle) */
.ccm-switch {
    position: relative;
    display: inline-block;
    width: 42px;
    height: 24px;
    flex: 0 0 auto;
}

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

.ccm-slider {
    position: absolute;
    cursor: pointer;
    inset: 0;
    background-color: #ccc;
    border-radius: 24px;
    transition: .2s;
}

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

.ccm-switch input:checked + .ccm-slider {
    background-color: var(--ccm-accent, #e2001a);
}

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

.ccm-switch-disabled .ccm-slider {
    cursor: not-allowed;
    opacity: .6;
}

/* ---------- RWD ---------- */
@media (max-width: 767px) {
    .ccm-position-bar .ccm-view,
    .ccm-position-bar .ccm-actions {
        width: 100%;
    }

    .ccm-position-bar .ccm-actions .ccm-btn {
        flex: 1 1 auto;
        text-align: center;
    }

    .ccm-position-modal .ccm-inner {
        padding: 20px;
    }
}
