/* ============================================
   Cookie Consent — Non-blocking banner
   Version 2026-05-09 (post-bounce-fix)
   Banner стои в долен десен ъгъл, НЕ блокира сайта
   ============================================ */

/* === Премахваме blur backdrop напълно === */
body.cookie-banner-active::before { display: none !important; }
body.cookie-banner-active { overflow: visible !important; }

/* === Override desktop centering — банерът стои bottom-right === */
@media (min-width: 769px) {
    .cookie-consent-banner {
        top: auto !important;
        left: auto !important;
        right: 20px !important;
        bottom: 20px !important;
        transform: none !important;
        max-width: 420px !important;
        width: auto !important;
        padding: 20px 24px !important;
        border-radius: 16px !important;
        animation: bbgSlideUp 0.4s ease-out !important;
        box-shadow: 0 10px 40px rgba(0, 0, 0, 0.18) !important;
        background: rgba(255, 255, 255, 0.97) !important;
        border: 1px solid rgba(0, 0, 0, 0.08) !important;
    }
    .cookie-consent-banner::before { display: none !important; }
    .cookie-consent-content { flex-direction: column !important; text-align: left !important; gap: 12px !important; }
    .cookie-consent-text { max-width: none !important; margin: 0 !important; }
    .cookie-consent-text h3 { font-size: 15px !important; margin: 0 0 6px !important; }
    .cookie-consent-text p { font-size: 13px !important; line-height: 1.4 !important; margin: 0 0 6px !important; }
    .cookie-promo-message { font-size: 12px !important; padding: 6px 10px !important; margin-top: 6px !important; }
    .cookie-consent-actions { flex-direction: row !important; justify-content: flex-end !important; gap: 8px !important; }
    .cookie-consent-actions .cookie-btn { padding: 8px 14px !important; font-size: 13px !important; }
}

/* Mobile — компактна версия на bottom */
@media (max-width: 768px) {
    .cookie-consent-banner {
        padding: 16px 18px !important;
        border-radius: 16px 16px 0 0 !important;
    }
    .cookie-consent-text h3 { font-size: 15px !important; }
    .cookie-consent-text p { font-size: 13px !important; line-height: 1.4 !important; }
    .cookie-promo-message { font-size: 12px !important; padding: 6px 10px !important; }
}

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

/* === Close X button (top-right на банера) === */
.cookie-consent-close {
    position: absolute;
    top: 8px;
    right: 10px;
    width: 28px;
    height: 28px;
    border: none;
    background: transparent;
    color: #999;
    font-size: 22px;
    line-height: 1;
    cursor: pointer;
    padding: 0;
    border-radius: 50%;
    transition: all 0.2s ease;
    z-index: 1;
}
.cookie-consent-close:hover {
    background: rgba(0, 0, 0, 0.06);
    color: #555;
}
.cookie-consent-banner { position: fixed; }

/* === REJECT WARNING DIALOG === */
.cookie-reject-dialog {
    position: fixed;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%) scale(0.85);
    z-index: 10001;
    background: #fff;
    border-radius: 16px;
    box-shadow: 0 20px 60px rgba(0,0,0,0.4);
    max-width: 480px;
    width: calc(100% - 40px);
    padding: 30px;
    text-align: center;
    opacity: 0;
    pointer-events: none;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}
.cookie-reject-dialog.cookie-reject-show {
    opacity: 1;
    transform: translate(-50%, -50%) scale(1);
    pointer-events: auto;
}
.cookie-reject-dialog .reject-icon {
    font-size: 56px;
    margin-bottom: 12px;
}
.cookie-reject-dialog h3 {
    font-size: 22px;
    color: #d32f2f;
    margin-bottom: 16px;
    font-weight: 700;
}
.cookie-reject-dialog .reject-list {
    text-align: left;
    background: #fff3e0;
    padding: 16px 20px;
    border-radius: 10px;
    margin-bottom: 16px;
}
.cookie-reject-dialog .reject-list-title {
    font-weight: 600;
    color: #333;
    margin-bottom: 8px;
    font-size: 14px;
}
.cookie-reject-dialog .reject-list ul {
    list-style: none;
    padding: 0;
    margin: 0;
}
.cookie-reject-dialog .reject-list li {
    padding: 4px 0;
    color: #555;
    font-size: 14px;
}
.cookie-reject-dialog .reject-promo {
    background: linear-gradient(135deg, #c5e1a5 0%, #aed581 100%);
    padding: 14px;
    border-radius: 10px;
    margin-bottom: 18px;
    color: #1b5e20;
    font-weight: 600;
    font-size: 14px;
}
.cookie-reject-dialog .reject-buttons {
    display: flex;
    gap: 10px;
}
.cookie-reject-dialog .cookie-btn {
    flex: 1;
    padding: 13px 16px;
    border-radius: 10px;
    font-size: 14px;
    font-weight: 600;
    cursor: pointer;
    border: none;
    transition: all 0.2s ease;
}
.cookie-reject-dialog .btn-still-reject {
    background: #fff;
    color: #999;
    border: 2px solid #ddd;
}
.cookie-reject-dialog .btn-still-reject:hover {
    background: #f5f5f5;
}
.cookie-reject-dialog .btn-accept-with-promo {
    background: linear-gradient(135deg, #68b81d 0%, #5aa319 100%);
    color: white;
}
.cookie-reject-dialog .btn-accept-with-promo:hover {
    transform: translateY(-2px);
    box-shadow: 0 5px 15px rgba(104, 184, 29, 0.5);
}

/* === REJECT LINK В BANNER === */
.cookie-reject-link {
    display: block;
    text-align: center;
    margin-top: 12px;
    color: #999;
    font-size: 13px;
    text-decoration: underline;
    cursor: pointer;
}
.cookie-reject-link:hover {
    color: #666;
}

/* === Master toggle row — text LEFT, toggle RIGHT === */
.cookie-master-toggle-row {
    display: flex !important;
    align-items: center !important;
    justify-content: space-between !important;
    gap: 16px !important;
    background: linear-gradient(135deg, #f5f9f0 0%, #e8f3dc 100%) !important;
    border: 1px solid #c5e1a5 !important;
    border-radius: 10px !important;
    padding: 14px 18px !important;
    margin-bottom: 20px !important;
}
.cookie-master-toggle-label {
    flex: 1;
    text-align: left;
}
.cookie-master-toggle-label strong {
    display: block;
    color: #2e7d32;
    font-size: 16px;
    margin-bottom: 3px;
}
.cookie-master-toggle-label small {
    display: block;
    color: #4a6c2a;
    font-size: 12px;
}

/* === Category rows — toggle LEFT, text LEFT === */
.cookie-category.cookie-category-left-toggle .cookie-category-header,
.cookie-category-left-toggle {
    display: flex !important;
    align-items: flex-start !important;
    gap: 14px !important;
    padding: 14px 4px !important;
    border-bottom: 1px solid #f0f0f0 !important;
}
.cookie-category-left-toggle:last-child {
    border-bottom: none !important;
}
.cookie-category-left-toggle .cookie-toggle {
    flex-shrink: 0 !important;
    margin-top: 2px !important;
}
.cookie-category-left-toggle .cookie-category-info {
    flex: 1 !important;
    text-align: left !important;
}
.cookie-category-left-toggle .cookie-category-info h4 {
    margin: 0 0 4px 0 !important;
    font-size: 15px !important;
    color: #333 !important;
}
.cookie-category-left-toggle .cookie-category-info p {
    margin: 0 !important;
    font-size: 13px !important;
    color: #666 !important;
    line-height: 1.4 !important;
}

/* === Footer layout — buttons left, accept all right === */
.cookie-modal-footer-new {
    display: flex !important;
    justify-content: space-between !important;
    align-items: center !important;
    padding: 16px 24px !important;
    border-top: 1px solid #eee !important;
    gap: 12px !important;
}
.cookie-modal-footer-new .footer-buttons-row {
    display: flex;
    gap: 8px;
}
.cookie-modal-footer-new .cookie-btn {
    padding: 12px 20px !important;
    border-radius: 8px !important;
    font-size: 14px !important;
    font-weight: 600 !important;
    cursor: pointer !important;
    border: none !important;
}
.cookie-modal-footer-new .cookie-btn-accept {
    background: linear-gradient(135deg, #68b81d 0%, #5aa319 100%) !important;
    color: white !important;
}
.cookie-modal-footer-new .cookie-btn-secondary {
    background: #fff !important;
    color: #555 !important;
    border: 1px solid #ddd !important;
}

@media (max-width: 600px) {
    .cookie-reject-dialog { padding: 25px 20px; }
    .cookie-modal-footer-new {
        flex-direction: column !important;
        gap: 10px !important;
    }
    .cookie-modal-footer-new .cookie-btn {
        width: 100% !important;
    }
}
