/* ============================================
   Cookie Consent Banner & Modal - Shared
   Used by: 1.html, article.html, contact.html, news.html, etc.
   ============================================ */
.cookie-consent {
    display: none;
    position: fixed;
    bottom: 24px;
    right: 24px;
    max-width: 420px;
    background: #fff;
    border-radius: 12px;
    box-shadow: 0 8px 40px rgba(0,0,0,0.18);
    z-index: 9999;
    padding: 24px;
    animation: cookieSlideUp 0.4s ease;
}

@keyframes cookieSlideUp {
    from { opacity: 0; transform: translateY(20px); }
    to { opacity: 1; transform: translateY(0); }
}

.cookie-content {}

.cookie-text {
    font-size: 0.9rem;
    color: #555;
    line-height: 1.6;
    margin-bottom: 16px;
}

.cookie-actions {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
}

.cookie-btn {
    padding: 10px 20px;
    border: none;
    border-radius: 6px;
    font-size: 0.85rem;
    font-weight: 500;
    cursor: pointer;
    transition: background 0.2s, opacity 0.2s;
}

.cookie-btn:hover {
    opacity: 0.88;
}

.cookie-accept {
    background: #0a3dad;
    color: #fff;
}

.cookie-settings {
    background: #f0f0f0;
    color: #333;
}

.cookie-reject {
    background: #e0e0e0;
    color: #666;
}

/* Cookie Modal */
.cookie-modal {
    display: none;
    position: fixed;
    inset: 0;
    z-index: 10000;
    align-items: center;
    justify-content: center;
}

.cookie-modal-overlay {
    position: absolute;
    inset: 0;
    background: rgba(0,0,0,0.45);
}

.cookie-modal-content {
    position: relative;
    background: #fff;
    border-radius: 12px;
    padding: 32px;
    max-width: 500px;
    width: 90%;
    max-height: 90vh;
    overflow-y: auto;
    z-index: 1;
}

.cookie-modal-content h3 {
    font-size: 1.3rem;
    margin-bottom: 8px;
    color: #222;
}

.cookie-modal-content > p {
    font-size: 0.9rem;
    color: #777;
    margin-bottom: 20px;
}

.cookie-option {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 14px 0;
    border-bottom: 1px solid #eee;
}

.cookie-option-info strong {
    display: block;
    font-size: 0.95rem;
    color: #333;
    margin-bottom: 4px;
}

.cookie-option-info span {
    font-size: 0.82rem;
    color: #999;
}

.cookie-toggle {
    position: relative;
    display: inline-block;
    width: 44px;
    height: 24px;
    flex-shrink: 0;
}

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

.cookie-toggle .toggle-slider {
    position: absolute;
    inset: 0;
    background: #ccc;
    border-radius: 24px;
    cursor: pointer;
    transition: background 0.2s;
}

.cookie-toggle .toggle-slider::before {
    content: '';
    position: absolute;
    width: 18px;
    height: 18px;
    left: 3px;
    top: 3px;
    background: #fff;
    border-radius: 50%;
    transition: transform 0.2s;
}

.cookie-toggle input:checked + .toggle-slider {
    background: #0a3dad;
}

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

.cookie-toggle.disabled .toggle-slider {
    background: #0a3dad99;
    cursor: not-allowed;
}

.cookie-modal-actions {
    display: flex;
    gap: 10px;
    margin-top: 20px;
    justify-content: flex-end;
}

@media (max-width: 480px) {
    .cookie-consent {
        right: 12px;
        left: 12px;
        bottom: 12px;
        max-width: none;
    }
    .cookie-actions {
        flex-direction: column;
    }
    .cookie-modal-content {
        padding: 24px;
    }
}
