/**
 * Cookie Consent Banner Styles
 * mailedofirm.pl
 */

/* Banner container */
#cookie-consent-banner {
    position: fixed !important;
    bottom: 0 !important;
    left: 0 !important;
    right: 0 !important;
    width: 100% !important;
    background: linear-gradient(135deg, #1e293b 0%, #334155 100%);
    box-shadow: 0 -4px 24px rgba(0, 0, 0, 0.3);
    z-index: 999999 !important;
    opacity: 0;
    transition: opacity 0.3s ease;
    font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', system-ui, sans-serif;
    transform: none !important;
    will-change: transform, opacity;
    backface-visibility: hidden !important;
}

.cookie-consent-container {
    max-width: 1400px;
    margin: 0 auto;
    padding: 24px 32px;
}

/* Main content */
.cookie-consent-main {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 32px;
}

.cookie-consent-content {
    display: flex;
    align-items: flex-start;
    gap: 20px;
    flex: 1;
}

.cookie-icon {
    font-size: 48px;
    line-height: 1;
    flex-shrink: 0;
}

.cookie-text {
    flex: 1;
}

.cookie-text h3 {
    color: #ffffff;
    font-size: 20px;
    font-weight: 700;
    margin: 0 0 8px 0;
}

.cookie-text p {
    color: #cbd5e1;
    font-size: 15px;
    line-height: 1.6;
    margin: 0;
}

.cookie-text a {
    color: #60a5fa;
    text-decoration: underline;
    transition: color 0.2s;
}

.cookie-text a:hover {
    color: #93c5fd;
}

/* Buttons */
.cookie-consent-buttons {
    display: flex;
    align-items: center;
    gap: 12px;
    flex-shrink: 0;
}

.cookie-btn {
    padding: 12px 24px;
    font-size: 15px;
    font-weight: 600;
    border: none;
    border-radius: 8px;
    cursor: pointer;
    transition: all 0.2s;
    white-space: nowrap;
}

.cookie-btn-primary {
    background: linear-gradient(135deg, #1e40af 0%, #3b82f6 100%);
    color: #ffffff;
}

.cookie-btn-primary:hover {
    background: linear-gradient(135deg, #1e3a8a 0%, #2563eb 100%);
    transform: translateY(-1px);
    box-shadow: 0 4px 12px rgba(59, 130, 246, 0.4);
}

.cookie-btn-secondary {
    background: transparent;
    color: #ffffff;
    border: 2px solid #64748b;
}

.cookie-btn-secondary:hover {
    border-color: #94a3b8;
    background: rgba(255, 255, 255, 0.05);
}

.cookie-btn-text {
    background: transparent;
    color: #94a3b8;
    padding: 12px 16px;
}

.cookie-btn-text:hover {
    color: #cbd5e1;
    background: rgba(255, 255, 255, 0.05);
}

/* Settings panel */
.cookie-consent-settings {
    max-width: 800px;
}

.cookie-consent-settings h3 {
    color: #ffffff;
    font-size: 22px;
    font-weight: 700;
    margin: 0 0 8px 0;
}

.cookie-settings-desc {
    color: #cbd5e1;
    font-size: 15px;
    margin: 0 0 24px 0;
}

/* Cookie categories */
.cookie-category {
    background: rgba(255, 255, 255, 0.05);
    border-radius: 12px;
    padding: 20px;
    margin-bottom: 16px;
}

.cookie-category-header {
    display: flex;
    align-items: flex-start;
    gap: 16px;
}

.cookie-category-info h4 {
    color: #ffffff;
    font-size: 16px;
    font-weight: 600;
    margin: 0 0 6px 0;
}

.cookie-category-info p {
    color: #94a3b8;
    font-size: 14px;
    line-height: 1.5;
    margin: 0;
}

/* Toggle switch */
.cookie-switch {
    position: relative;
    display: inline-block;
    width: 52px;
    height: 28px;
    flex-shrink: 0;
}

.cookie-switch input {
    opacity: 0;
    width: 0;
    height: 0;
}

.cookie-slider {
    position: absolute;
    cursor: pointer;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background-color: #475569;
    transition: 0.3s;
    border-radius: 28px;
}

.cookie-slider:before {
    position: absolute;
    content: "";
    height: 20px;
    width: 20px;
    left: 4px;
    bottom: 4px;
    background-color: white;
    transition: 0.3s;
    border-radius: 50%;
}

input:checked + .cookie-slider {
    background: linear-gradient(135deg, #1e40af 0%, #3b82f6 100%);
}

input:checked + .cookie-slider:before {
    transform: translateX(24px);
}

input:disabled + .cookie-slider {
    cursor: not-allowed;
    opacity: 0.6;
}

/* Settings buttons */
.cookie-settings-buttons {
    display: flex;
    gap: 12px;
    margin-top: 24px;
}

/* Responsive */
@media (max-width: 1024px) {
    .cookie-consent-main {
        flex-direction: column;
        align-items: stretch;
    }

    .cookie-consent-buttons {
        justify-content: stretch;
    }

    .cookie-btn {
        flex: 1;
    }
}

@media (max-width: 768px) {
    .cookie-consent-container {
        padding: 20px 16px;
    }

    .cookie-consent-content {
        flex-direction: column;
        gap: 16px;
    }

    .cookie-icon {
        font-size: 36px;
    }

    .cookie-text h3 {
        font-size: 18px;
    }

    .cookie-text p {
        font-size: 14px;
    }

    .cookie-consent-buttons {
        flex-direction: column;
    }

    .cookie-btn {
        width: 100%;
        text-align: center;
    }

    .cookie-settings-buttons {
        flex-direction: column;
    }
}

@media (max-width: 480px) {
    .cookie-consent-container {
        padding: 16px 12px;
    }

    .cookie-text h3 {
        font-size: 16px;
    }

    .cookie-text p {
        font-size: 13px;
    }

    .cookie-btn {
        padding: 10px 16px;
        font-size: 14px;
    }

    .cookie-category {
        padding: 16px;
    }

    .cookie-category-info h4 {
        font-size: 15px;
    }

    .cookie-category-info p {
        font-size: 13px;
    }
}

/* Animation */
@keyframes slideUp {
    from {
        transform: translate3d(0, 100%, 0) !important;
        opacity: 0;
    }
    to {
        transform: translate3d(0, 0, 0) !important;
        opacity: 1;
    }
}

#cookie-consent-banner {
    animation: slideUp 0.4s ease-out forwards !important;
}

/* Print - ukryj banner */
@media print {
    #cookie-consent-banner {
        display: none !important;
    }
}

/* CRITICAL FIX - Zapewnienie że banner jest zawsze przypięty do dołu viewport */
/* Nadpisuje problematyczne style z innych plików CSS (np. transform na body) */
#cookie-consent-banner {
    position: fixed !important;
    bottom: 0 !important;
    left: 0 !important;
    right: 0 !important;
    width: 100vw !important;
    max-width: 100vw !important;
    z-index: 2147483647 !important;
    backface-visibility: hidden !important;
    -webkit-backface-visibility: hidden !important;
    perspective: 1000px !important;
    -webkit-perspective: 1000px !important;
}

/* Zapewnienie że container nie psuje layoutu */
#cookie-consent-banner .cookie-consent-container {
    position: relative !important;
    max-width: 1400px !important;
    margin: 0 auto !important;
    transform: none !important;
}
