/* cookie-styles.css - STYLE DLA BANERA COOKIES */

/* PODSTAWOWE STYLE */
#cookieConsentBanner {
    position: fixed;
    bottom: 20px;
    left: 50%;
    transform: translateX(-50%);
    width: fit-content;
    max-width: 90vw;
    min-width: 320px;
    height: auto;
    min-height: auto;
    max-height: none;
    padding: 20px;
    z-index: 10000;
    font-family: 'Segoe UI', system-ui, -apple-system, sans-serif;
    display: none;
    opacity: 0;
    transition: opacity 0.3s ease, max-width 0.3s ease, transform 0.3s ease;
    box-sizing: border-box;
    overflow: visible;
    border-radius: 12px;
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.15);
}

/* Dla pozycji center upewnij się, że nie ma rozciągania */
#cookieConsentBanner[style*="top: 50%"] {
    height: auto !important;
    max-height: 90vh;
    overflow-y: auto;
}

.cookie-content {
    display: flex;
    flex-direction: column;
    width: 100%;
    height: auto;
}

#cookieConsentBanner.settings-open {
    max-width: 800px;
    width: 90%;
}

#cookieBackdrop {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: 9999;
    pointer-events: none;
    transition: opacity 0.3s ease;
}

/* Klasy dla rozmycia i przyciemnienia */
body.cookie-blur {
    backdrop-filter: blur(5px);
    -webkit-backdrop-filter: blur(5px);
}

body.cookie-overlay::before {
    content: '';
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.5);
    z-index: 9998;
    pointer-events: none;
}

#cookieFloatingIcon {
    position: fixed;
    bottom: 20px;
    right: 20px;
    width: 50px;
    height: 50px;
    border-radius: 50%;
    display: none;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    z-index: 9999;
    transition: all 0.3s ease;
    border: 2px solid white;
    padding: 0;
    box-sizing: border-box;
}

#cookieFloatingIcon svg {
    width: 24px;
    height: 24px;
    color: white;
    display: block;
    margin: 0 auto;
    flex-shrink: 0;
}

/* PRZYCISKI */
.cookie-btn {
    transition: all 0.2s ease;
    font-family: inherit;
    padding: 12px 24px;
    border-radius: 8px;
    cursor: pointer;
    font-size: 14px;
    font-weight: 500;
    border: none;
}

.cookie-btn:hover {
    transform: translateY(-1px);
}

.btn-primary {
    border: none !important;
    cursor: pointer !important;
    font-size: 14px !important;
    font-weight: 500 !important;
    padding: 12px 24px !important;
}

.btn-outline {
    border-radius: 8px !important;
    cursor: pointer !important;
    font-size: 14px !important;
    font-weight: 500 !important;
    padding: 12px 24px !important;
}

#cookieFloatingIcon:hover {
    transform: scale(1.1);
}

/* PRZEŁĄCZNIKI */
.toggle-switch {
    position: relative;
    display: inline-block;
    width: 44px;
    height: 24px;
}

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

.toggle-slider {
    position: absolute;
    cursor: pointer;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    transition: .3s;
    border-radius: 24px;
}

.toggle-slider:before {
    position: absolute;
    content: "";
    height: 18px;
    width: 18px;
    left: 3px;
    bottom: 3px;
    background-color: white;
    transition: .3s;
    border-radius: 50%;
}

input:checked + .toggle-slider:before {
    transform: translateX(20px);
}

/* KATEGORIE COOKIES */
.category-header {
    cursor: pointer;
    transition: opacity 0.2s ease, background 0.2s ease;
}

.category-header:hover {
    opacity: 0.9;
}

.folder-icon {
    transition: transform 0.3s ease;
}

.cookie-icon svg {
    flex-shrink: 0;
}

.language-switcher {
    display: flex;
    gap: 4px;
    flex-wrap: wrap;
}

.lang-btn {
    transition: all 0.2s ease !important;
}

.lang-btn.active {
    pointer-events: none;
}

.necessary-category {
    font-weight: 600;
}

.analytics-category {
    font-weight: 600;
}

.marketing-category {
    font-weight: 600;
}

.unknown-category {
    font-weight: 600;
}

/* ANIMACJE */
@keyframes fadeIn {
    from { opacity: 0; }
    to { opacity: 1; }
}
@keyframes slideUp { from { transform: translateY(100px); opacity: 0; } to { transform: translateY(0); opacity: 1; } }
@keyframes slideDown { from { transform: translateY(-100px); opacity: 0; } to { transform: translateY(0); opacity: 1; } }
@keyframes slideLeft { from { transform: translateX(100px); opacity: 0; } to { transform: translateX(0); opacity: 1; } }
@keyframes slideRight { from { transform: translateX(-100px); opacity: 0; } to { transform: translateX(0); opacity: 1; } }
@keyframes zoomIn { from { transform: scale(0.5); opacity: 0; } to { transform: scale(1); opacity: 1; } }
@keyframes bounceIn {
    0% { transform: scale(0.3); opacity: 0; }
    50% { transform: scale(1.05); }
    70% { transform: scale(0.9); }
    100% { transform: scale(1); opacity: 1; }
}

.animation-fade { animation: fadeIn 0.3s ease-out; }
.animation-slide { animation: slideUp 0.5s ease-out; }
.animation-zoom { animation: zoomIn 0.5s ease-out; }
.animation-bounce { animation: bounceIn 0.7s cubic-bezier(0.68, -0.55, 0.265, 1.55); }

#cookieConsentBanner[data-animation="slide"][style*="top"] {
    animation: slideDown 0.5s ease-out;
}
#cookieConsentBanner[data-animation="slide"][style*="bottom"] {
    animation: slideUp 0.5s ease-out;
}
#cookieConsentBanner[data-animation="slide"][style*="right"]:not([style*="left"]) {
    animation: slideLeft 0.5s ease-out;
}
#cookieConsentBanner[data-animation="slide"][style*="left"]:not([style*="right"]) {
    animation: slideRight 0.5s ease-out;
}

/* RESPONSYWNOŚĆ */
@media (max-width: 768px) {
    #cookieConsentBanner {
        bottom: 10px !important;
        width: 95% !important;
        max-width: 95% !important;
        min-width: auto !important;
        padding: 16px !important;
        left: 50% !important;
        right: auto !important;
        transform: translateX(-50%) !important;
    }
    
    #cookieConsentBanner.settings-open {
        width: 95% !important;
        max-width: 95% !important;
    }
    
    .cookie-buttons {
        flex-direction: column !important;
    }
    
    .cookie-btn {
        width: 100% !important;
    }
    
    .language-switcher {
        margin-top: 8px !important;
        flex-wrap: wrap !important;
    }
    
    #cookieFloatingIcon {
        bottom: 15px !important;
        right: 15px !important;
        width: 45px !important;
        height: 45px !important;
    }
}

/* --- WSZYSTKIE MOTYWY SĄ TERAZ STEROWANE PRZEZ JS --- */
/* NIE DODAWAJ TU KOLORÓW – ZOSTAW TO DLA applyThemeColors() */