/* Cookie Consent Management Platform - Expanza */

/* Cookie Banner */
#cookieBanner {
    position: fixed;
    bottom: 0;
    left: 0;
    right: 0;
    background: linear-gradient(135deg, #1e293b 0%, #0f172a 100%);
    color: white;
    padding: 20px;
    box-shadow: 0 -4px 20px rgba(0, 0, 0, 0.3);
    z-index: 10000;
    transform: translateY(100%);
    transition: transform 0.3s ease-in-out;
    border-top: 3px solid #3b82f6;
}

#cookieBanner.show {
    transform: translateY(0);
}

.cookie-banner-content {
    max-width: 1200px;
    margin: 0 auto;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 20px;
}

.cookie-banner-text {
    flex: 1;
    font-size: 14px;
    line-height: 1.5;
}

.cookie-banner-text strong {
    color: #60a5fa;
    font-weight: 600;
}

.cookie-banner-buttons {
    display: flex;
    gap: 12px;
    flex-shrink: 0;
}

.cookie-btn {
    padding: 12px 24px;
    border: none;
    border-radius: 8px;
    font-weight: 600;
    font-size: 14px;
    cursor: pointer;
    transition: all 0.2s ease;
    text-decoration: none;
    display: inline-block;
    text-align: center;
    min-width: 120px;
}

.cookie-btn-primary {
    background: #3b82f6;
    color: white;
}

.cookie-btn-primary:hover {
    background: #2563eb;
    transform: translateY(-1px);
}

.cookie-btn-secondary {
    background: transparent;
    color: #94a3b8;
    border: 2px solid #475569;
}

.cookie-btn-secondary:hover {
    background: #475569;
    color: white;
}

.cookie-btn-outline {
    background: transparent;
    color: #60a5fa;
    border: 2px solid #3b82f6;
}

.cookie-btn-outline:hover {
    background: #3b82f6;
    color: white;
}

/* Cookie Settings Modal */
#cookieModal {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0, 0, 0, 0.8);
    z-index: 10001;
    display: none;
    align-items: center;
    justify-content: center;
    padding: 20px;
}

#cookieModal.show {
    display: flex;
}

.cookie-modal-content {
    background: white;
    border-radius: 16px;
    padding: 32px;
    max-width: 600px;
    width: 100%;
    max-height: 80vh;
    overflow-y: auto;
    box-shadow: 0 20px 40px rgba(0, 0, 0, 0.3);
}

.cookie-modal-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 24px;
    padding-bottom: 16px;
    border-bottom: 2px solid #f1f5f9;
}

.cookie-modal-title {
    font-size: 24px;
    font-weight: 700;
    color: #0f172a;
    margin: 0;
}

.cookie-modal-close {
    background: none;
    border: none;
    font-size: 24px;
    color: #64748b;
    cursor: pointer;
    padding: 8px;
    border-radius: 8px;
    transition: all 0.2s ease;
}

.cookie-modal-close:hover {
    background: #f1f5f9;
    color: #0f172a;
}

.cookie-category {
    margin-bottom: 24px;
    padding: 20px;
    border: 2px solid #e2e8f0;
    border-radius: 12px;
    transition: all 0.2s ease;
}

.cookie-category.active {
    border-color: #3b82f6;
    background: #f8fafc;
}

.cookie-category-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 12px;
}

.cookie-category-title {
    font-size: 18px;
    font-weight: 600;
    color: #0f172a;
    margin: 0;
}

.cookie-category-toggle {
    position: relative;
    width: 48px;
    height: 24px;
    background: #cbd5e1;
    border-radius: 12px;
    cursor: pointer;
    transition: all 0.2s ease;
}

.cookie-category-toggle.active {
    background: #3b82f6;
}

.cookie-category-toggle::after {
    content: '';
    position: absolute;
    top: 2px;
    left: 2px;
    width: 20px;
    height: 20px;
    background: white;
    border-radius: 50%;
    transition: all 0.2s ease;
}

.cookie-category-toggle.active::after {
    transform: translateX(24px);
}

.cookie-category-description {
    font-size: 14px;
    color: #64748b;
    line-height: 1.5;
    margin: 0;
}

.cookie-category-required {
    font-size: 12px;
    color: #059669;
    font-weight: 600;
    margin-top: 8px;
}

.cookie-modal-buttons {
    display: flex;
    gap: 12px;
    justify-content: flex-end;
    margin-top: 24px;
    padding-top: 20px;
    border-top: 2px solid #f1f5f9;
}

/* Cookie Settings Button */
#cookieSettingsBtn {
    position: fixed;
    bottom: 20px;
    left: 20px;
    background: #3b82f6;
    color: white;
    border: none;
    border-radius: 50px;
    padding: 12px 20px;
    font-size: 14px;
    font-weight: 600;
    cursor: pointer;
    box-shadow: 0 4px 12px rgba(59, 130, 246, 0.3);
    transition: all 0.2s ease;
    z-index: 9999;
    display: none;
}

#cookieSettingsBtn:hover {
    background: #2563eb;
    transform: translateY(-2px);
    box-shadow: 0 6px 16px rgba(59, 130, 246, 0.4);
}

#cookieSettingsBtn.show {
    display: block;
}

/* Fallback Messages */
#cookieFallback,
#braveMessage,
#calendlyFallback {
    position: fixed;
    top: 20px;
    left: 50%;
    transform: translateX(-50%);
    background: linear-gradient(135deg, #dc2626 0%, #b91c1c 100%);
    color: white;
    padding: 20px;
    border-radius: 12px;
    box-shadow: 0 8px 32px rgba(220, 38, 38, 0.3);
    z-index: 10002;
    max-width: 500px;
    width: 90%;
    border: 2px solid #fca5a5;
    display: none;
}

#cookieFallback.show,
#braveMessage.show,
#calendlyFallback.show {
    display: block;
    animation: slideDown 0.3s ease-out;
}

@keyframes slideDown {
    from {
        opacity: 0;
        transform: translateX(-50%) translateY(-20px);
    }
    to {
        opacity: 1;
        transform: translateX(-50%) translateY(0);
    }
}

.cookie-fallback-content {
    display: flex;
    align-items: flex-start;
    gap: 16px;
    position: relative;
}

.cookie-fallback-icon {
    font-size: 24px;
    flex-shrink: 0;
    margin-top: 4px;
}

.cookie-fallback-text {
    flex: 1;
}

.cookie-fallback-text h3 {
    margin: 0 0 8px 0;
    font-size: 18px;
    font-weight: 700;
    color: #fef2f2;
}

.cookie-fallback-text p {
    margin: 0 0 12px 0;
    font-size: 14px;
    line-height: 1.5;
    color: #fecaca;
}

.cookie-fallback-text ol {
    margin: 8px 0;
    padding-left: 20px;
    color: #fecaca;
}

.cookie-fallback-text li {
    margin: 4px 0;
    font-size: 14px;
}

.cookie-fallback-close {
    position: absolute;
    top: -8px;
    right: -8px;
    background: rgba(255, 255, 255, 0.2);
    border: none;
    color: white;
    width: 32px;
    height: 32px;
    border-radius: 50%;
    font-size: 18px;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.2s ease;
}

.cookie-fallback-close:hover {
    background: rgba(255, 255, 255, 0.3);
    transform: scale(1.1);
}

/* Specjalne style dla Brave */
#braveMessage {
    background: linear-gradient(135deg, #f59e0b 0%, #d97706 100%);
    border-color: #fbbf24;
}

#braveMessage .cookie-fallback-text h3 {
    color: #fef3c7;
}

#braveMessage .cookie-fallback-text p,
#braveMessage .cookie-fallback-text li {
    color: #fde68a;
}

/* Specjalne style dla Calendly fallback */
#calendlyFallback {
    background: linear-gradient(135deg, #059669 0%, #047857 100%);
    border-color: #34d399;
}

#calendlyFallback .cookie-fallback-text h3 {
    color: #ecfdf5;
}

#calendlyFallback .cookie-fallback-text p {
    color: #a7f3d0;
}

.calendly-direct-link {
    display: inline-block;
    background: rgba(255, 255, 255, 0.2);
    color: white;
    padding: 12px 20px;
    border-radius: 8px;
    text-decoration: none;
    font-weight: 600;
    font-size: 14px;
    transition: all 0.2s ease;
    border: 2px solid rgba(255, 255, 255, 0.3);
}

.calendly-direct-link:hover {
    background: rgba(255, 255, 255, 0.3);
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.2);
}

.mobile-only { display: none !important; }
@media (max-width: 768px) {
    .mobile-only.show { display: block !important; }
}
@media (min-width: 769px) {
    #calendlyFallback,
    #calendlyFallback.show,
    .mobile-only,
    .mobile-only.show {
        display: none !important;
    }
}

/* Responsive Design */
@media (max-width: 768px) {
    .cookie-banner-content {
        flex-direction: column;
        text-align: center;
        gap: 16px;
    }
    
    .cookie-banner-buttons {
        width: 100%;
        justify-content: center;
    }
    
    .cookie-btn {
        flex: 1;
        min-width: auto;
    }
    
    .cookie-modal-content {
        margin: 20px;
        padding: 24px;
    }
    
    .cookie-modal-buttons {
        flex-direction: column;
    }
    
    #cookieSettingsBtn {
        bottom: 20px;
        left: 50%;
        transform: translateX(-50%);
    }

    /* Fallback messages responsive */
    #cookieFallback,
    #braveMessage,
    #calendlyFallback {
        top: 10px;
        left: 10px;
        right: 10px;
        transform: none;
        width: auto;
        max-width: none;
    }

    .cookie-fallback-content {
        flex-direction: column;
        text-align: center;
        gap: 12px;
    }

    .cookie-fallback-icon {
        font-size: 32px;
        margin-top: 0;
    }
}

@media (max-width: 480px) {
    .cookie-banner-buttons {
        flex-direction: column;
    }
    
    .cookie-btn {
        width: 100%;
    }

    .cookie-fallback-text h3 {
        font-size: 16px;
    }

    .cookie-fallback-text p,
    .cookie-fallback-text li {
        font-size: 13px;
    }
}
