/* Banner RODO - Style główne */
#banner-rodo:focus {
    outline: none;
}

#banner-rodo {
    position: fixed;
    bottom: 0;
    left: 0;
    right: 0;
    padding: 14px 20px;
    z-index: 9999;
    box-shadow: 0 -2px 15px rgba(0, 0, 0, 0.1);
    border-top: 3px solid;
    display: none;
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Oxygen-Sans, Ubuntu, Cantarell, "Helvetica Neue", sans-serif;
    font-size: 14px;
    line-height: 1.5;
}

#banner-rodo.position-top {
    top: 0;
    bottom: auto;
    border-top: none;
    border-bottom: 3px solid;
    box-shadow: 0 2px 15px rgba(0, 0, 0, 0.1);
}

.banner-rodo-content {
    max-width: 1200px;
    margin: 0 auto;
}

/* Główny wiersz: tekst po lewej, przyciski po prawej */
.banner-rodo-row {
    display: flex;
    align-items: center;
    gap: 24px;
}

.banner-rodo-text {
    flex: 1;
    min-width: 0;
}

.banner-rodo-message {
    margin-bottom: 2px;
}

.banner-rodo-message p {
    margin: 0;
}

/* Info o kategoriach */
.banner-rodo-purposes {
    font-size: 12px;
    opacity: 0.7;
    line-height: 1.4;
}

.banner-rodo-purposes .banner-rodo-link {
    margin-left: 4px;
}

/* Kategorie */
.banner-rodo-categories {
    display: flex;
    gap: 8px;
    margin-top: 10px;
    flex-wrap: wrap;
}

.banner-rodo-category {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 8px 12px;
    background: rgba(255, 255, 255, 0.08);
    border-radius: 6px;
    cursor: pointer;
    transition: background 0.2s;
    flex: 1;
    min-width: 150px;
}

.banner-rodo-category:hover {
    background: rgba(255, 255, 255, 0.12);
}

/* Toggle switch */
.banner-rodo-category-toggle {
    position: relative;
    display: inline-block;
    width: 36px;
    height: 20px;
    flex-shrink: 0;
}

.banner-rodo-category-toggle input {
    opacity: 0;
    width: 0;
    height: 0;
    position: absolute;
}

.category-slider {
    position: absolute;
    cursor: pointer;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background-color: rgba(255, 255, 255, 0.25);
    transition: 0.3s;
    border-radius: 20px;
}

.category-slider:before {
    position: absolute;
    content: "";
    height: 14px;
    width: 14px;
    left: 3px;
    bottom: 3px;
    background-color: #fff;
    transition: 0.3s;
    border-radius: 50%;
}

.banner-rodo-category-toggle input:checked + .category-slider {
    background-color: #007cba;
}

.banner-rodo-category-toggle input:checked + .category-slider:before {
    transform: translateX(16px);
}

.banner-rodo-category-toggle input:disabled + .category-slider {
    opacity: 0.6;
    cursor: not-allowed;
}

.category-info {
    display: flex;
    flex-direction: column;
    gap: 0;
    min-width: 0;
}

.category-name {
    font-weight: 600;
    font-size: 12px;
    line-height: 1.3;
}

.category-desc {
    font-size: 10px;
    opacity: 0.65;
    line-height: 1.3;
}

/* Przyciski */
.banner-rodo-buttons {
    display: flex;
    gap: 8px;
    flex-shrink: 0;
    align-items: center;
    align-self: center;
}

.banner-rodo-button {
    border: none;
    padding: 9px 18px;
    cursor: pointer;
    border-radius: 6px;
    text-decoration: none;
    font-size: 13px;
    font-weight: 500;
    transition: all 0.3s ease;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-height: 38px;
    box-sizing: border-box;
    white-space: nowrap;
}

.banner-rodo-button:hover {
    transform: translateY(-1px);
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.15);
}

.banner-rodo-button:focus-visible {
    outline: 3px solid #fff;
    outline-offset: 2px;
    box-shadow: 0 0 0 5px rgba(0, 0, 0, 0.4);
}

.banner-rodo-button:active {
    transform: translateY(0);
}

.banner-rodo-button.primary {
    font-weight: 600;
}

.banner-rodo-button.reject {
    background: transparent;
    color: inherit;
    font-weight: 600;
    border: 2px solid currentColor;
}

.banner-rodo-button.reject:hover {
    background: rgba(255, 255, 255, 0.1);
}

.banner-rodo-button.save {
    background: rgba(255, 255, 255, 0.15);
    color: inherit;
    border: 1px solid rgba(255, 255, 255, 0.3);
}

.banner-rodo-button.save:hover {
    background: rgba(255, 255, 255, 0.25);
}

/* Footer */
.banner-rodo-footer {
    margin-top: 4px;
    font-size: 11px;
    opacity: 0.5;
}

.banner-rodo-footer--mobile {
    display: none;
}

.banner-rodo-separator {
    margin: 0 6px;
    opacity: 0.5;
}

.banner-rodo-link {
    color: inherit;
    text-decoration: underline;
    text-underline-offset: 2px;
    transition: opacity 0.2s ease;
}

.banner-rodo-link:hover {
    opacity: 1;
    color: inherit;
}

/* Zakładka — zmiana ustawień cookies (na dole strony) */
.banner-rodo-tab {
    position: fixed;
    left: 0;
    bottom: 0;
    z-index: 9998;
    width: 28px;
    height: 28px;
    border: none;
    border-radius: 0 6px 0 0;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    box-shadow: 2px -1px 6px rgba(0, 0, 0, 0.15);
    transition: width 0.2s, opacity 0.3s, visibility 0.3s;
    padding: 0;
    opacity: 0;
    visibility: hidden;
    pointer-events: none;
}

.banner-rodo-tab.visible {
    opacity: 0.6;
    visibility: visible;
    pointer-events: auto;
}

.banner-rodo-tab:hover {
    opacity: 1;
    width: 34px;
}

/* Floating button — zmiana ustawień cookies (kółko) */
.banner-rodo-float {
    position: fixed;
    left: 16px;
    bottom: 16px;
    z-index: 9998;
    width: 40px;
    height: 40px;
    border: none;
    border-radius: 50%;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.2);
    transition: transform 0.2s, opacity 0.3s, visibility 0.3s;
    padding: 0;
    opacity: 0;
    visibility: hidden;
    pointer-events: none;
}

.banner-rodo-float.visible {
    opacity: 0.8;
    visibility: visible;
    pointer-events: auto;
}

.banner-rodo-float:hover {
    opacity: 1;
    transform: scale(1.1);
}

/* Responsywność */
@media (max-width: 768px) {
    #banner-rodo {
        padding: 10px 12px;
        max-height: 70dvh;
        overflow-y: auto;
        -webkit-overflow-scrolling: touch;
    }

    .banner-rodo-row {
        flex-direction: column;
        gap: 8px;
        align-items: stretch;
    }

    .banner-rodo-message {
        font-size: 13px;
        margin-bottom: 0;
    }

    .banner-rodo-purposes {
        font-size: 11px;
    }

    .banner-rodo-footer--desktop {
        display: none;
    }

    .banner-rodo-footer--mobile {
        display: block;
        text-align: center;
        font-size: 10px;
        margin-top: 6px;
    }

    .banner-rodo-categories {
        flex-direction: row;
        flex-wrap: wrap;
    }

    .banner-rodo-category {
        min-width: 0;
        flex: 1 1 calc(50% - 4px);
        padding: 6px 10px;
    }

    .banner-rodo-buttons {
        display: flex;
        flex-direction: row;
        flex-wrap: wrap;
        gap: 6px;
    }

    .banner-rodo-button {
        flex: 1 1 auto;
        min-width: 0;
        padding: 10px 8px;
        font-size: 12px;
        min-height: 40px;
        white-space: normal;
        text-align: center;
    }

    /* Akceptuj — pełna szerokość na dole */
    .banner-rodo-button.primary {
        flex-basis: 100%;
    }
}

/* Tooltip dla zakładki i kółka — tylko desktop (hover) */
@media (hover: hover) {
    .banner-rodo-tab[data-tooltip],
    .banner-rodo-float[data-tooltip] {
        overflow: visible;
    }

    .banner-rodo-tab[data-tooltip]::after,
    .banner-rodo-float[data-tooltip]::after {
        content: attr(data-tooltip);
        position: absolute;
        bottom: calc(100% + 8px);
        left: 0;
        background: rgba(0, 0, 0, 0.75);
        color: #fff;
        font-size: 11px;
        font-weight: 500;
        white-space: nowrap;
        padding: 4px 8px;
        border-radius: 4px;
        pointer-events: none;
        opacity: 0;
        transition: opacity 0.2s;
    }

    .banner-rodo-tab:hover[data-tooltip]::after,
    .banner-rodo-float:hover[data-tooltip]::after {
        opacity: 1;
    }
}

/* Animacje */
@keyframes slideInFromBottom {
    from {
        transform: translateY(100%);
        opacity: 0;
    }
    to {
        transform: translateY(0);
        opacity: 1;
    }
}

@keyframes slideInFromTop {
    from {
        transform: translateY(-100%);
        opacity: 0;
    }
    to {
        transform: translateY(0);
        opacity: 1;
    }
}

.banner-animate-slide.position-bottom {
    animation: slideInFromBottom 0.4s ease-out;
}

.banner-animate-slide.position-top {
    animation: slideInFromTop 0.4s ease-out;
}
