/**
 * CashFlow Cookie Consent Styles
 * תיקון 13 לחוק הגנת הפרטיות - עיצוב באנר ועוגיות
 */

/* Cookie Banner */
.cookie-banner {
    position: fixed;
    bottom: 0;
    left: 0;
    right: 0;
    z-index: 999999;
    background: rgba(0, 0, 0, 0.98);
    backdrop-filter: blur(20px);
    border-top: 2px solid rgba(139, 92, 246, 0.5);
    box-shadow: 0 -4px 30px rgba(0, 0, 0, 0.5);
    padding: 2rem;
    transform: translateY(100%);
    transition: transform 0.4s ease;
    direction: rtl;
}

.cookie-banner.show {
    transform: translateY(0);
}

.cookie-banner-content {
    max-width: 1200px;
    margin: 0 auto;
    display: grid;
    grid-template-columns: auto 1fr auto;
    gap: 2rem;
    align-items: center;
}

.cookie-banner-icon svg {
    width: 60px;
    height: 60px;
    flex-shrink: 0;
}

.cookie-banner-text h3 {
    font-size: 1.5rem;
    font-weight: 700;
    color: white;
    margin: 0 0 0.5rem 0;
}

.cookie-banner-text p {
    font-size: 1rem;
    color: rgba(255, 255, 255, 0.85);
    line-height: 1.6;
    margin: 0 0 0.5rem 0;
}

.cookie-banner-subtext {
    font-size: 0.9rem !important;
    color: rgba(255, 255, 255, 0.6) !important;
}

.cookie-banner-subtext a {
    color: #8b5cf6;
    text-decoration: underline;
    transition: color 0.3s ease;
}

.cookie-banner-subtext a:hover {
    color: #ec4899;
}

.cookie-banner-actions {
    display: flex;
    flex-direction: column;
    gap: 0.75rem;
    min-width: 250px;
}

/* Cookie Buttons */
.cookie-btn {
    padding: 0.85rem 1.5rem;
    border: none;
    border-radius: 10px;
    font-size: 1rem;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
    white-space: nowrap;
}

.cookie-btn svg {
    width: 20px;
    height: 20px;
}

.cookie-btn-accept {
    background: linear-gradient(135deg, #8b5cf6, #ec4899);
    color: white;
}

.cookie-btn-accept:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 25px rgba(139, 92, 246, 0.5);
}

.cookie-btn-reject {
    background: rgba(239, 68, 68, 0.2);
    color: #f87171;
    border: 1px solid rgba(239, 68, 68, 0.5);
}

.cookie-btn-reject:hover {
    background: rgba(239, 68, 68, 0.3);
}

.cookie-btn-customize {
    background: rgba(255, 255, 255, 0.1);
    color: white;
    border: 1px solid rgba(255, 255, 255, 0.2);
}

.cookie-btn-customize:hover {
    background: rgba(255, 255, 255, 0.15);
}

.cookie-btn-secondary {
    background: rgba(255, 255, 255, 0.1);
    color: white;
    border: 1px solid rgba(139, 92, 246, 0.3);
}

.cookie-btn-secondary:hover {
    background: rgba(139, 92, 246, 0.2);
}

/* Cookie Modal */
.cookie-modal {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    z-index: 1000000;
    display: flex;
    align-items: center;
    justify-content: center;
    opacity: 0;
    visibility: hidden;
    transition: all 0.3s ease;
    direction: rtl;
}

.cookie-modal.show {
    opacity: 1;
    visibility: visible;
}

.cookie-modal-overlay {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0, 0, 0, 0.85);
    backdrop-filter: blur(5px);
}

.cookie-modal-content {
    position: relative;
    z-index: 1;
    width: 90%;
    max-width: 700px;
    max-height: 90vh;
    background: rgba(0, 0, 0, 0.95);
    backdrop-filter: blur(20px);
    border: 1px solid rgba(139, 92, 246, 0.3);
    border-radius: 20px;
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.5);
    display: flex;
    flex-direction: column;
    transform: scale(0.9);
    transition: transform 0.3s ease;
}

.cookie-modal.show .cookie-modal-content {
    transform: scale(1);
}

.cookie-modal-header {
    padding: 2rem;
    border-bottom: 1px solid rgba(255, 255, 255, 0.1);
    display: flex;
    justify-content: space-between;
    align-items: center;
    background: linear-gradient(135deg, rgba(139, 92, 246, 0.2), rgba(236, 72, 153, 0.2));
}

.cookie-modal-header h2 {
    margin: 0;
    font-size: 1.8rem;
    font-weight: 700;
    color: white;
}

.cookie-modal-close {
    width: 40px;
    height: 40px;
    border: none;
    background: rgba(255, 255, 255, 0.1);
    border-radius: 10px;
    color: white;
    cursor: pointer;
    transition: all 0.3s ease;
    display: flex;
    align-items: center;
    justify-content: center;
}

.cookie-modal-close:hover {
    background: rgba(255, 255, 255, 0.2);
    transform: rotate(90deg);
}

.cookie-modal-close svg {
    width: 24px;
    height: 24px;
}

.cookie-modal-body {
    padding: 2rem;
    overflow-y: auto;
    flex: 1;
}

.cookie-modal-body::-webkit-scrollbar {
    width: 8px;
}

.cookie-modal-body::-webkit-scrollbar-track {
    background: rgba(255, 255, 255, 0.05);
}

.cookie-modal-body::-webkit-scrollbar-thumb {
    background: rgba(139, 92, 246, 0.5);
    border-radius: 4px;
}

.cookie-modal-intro {
    font-size: 1.05rem;
    color: rgba(255, 255, 255, 0.8);
    line-height: 1.6;
    margin-bottom: 2rem;
}

/* Cookie Categories */
.cookie-categories {
    display: flex;
    flex-direction: column;
    gap: 1.5rem;
}

.cookie-category {
    background: rgba(255, 255, 255, 0.05);
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 15px;
    padding: 1.5rem;
    transition: all 0.3s ease;
}

.cookie-category:hover {
    background: rgba(255, 255, 255, 0.08);
    border-color: rgba(139, 92, 246, 0.3);
}

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

.cookie-category-title {
    display: flex;
    align-items: center;
    gap: 1rem;
}

.cookie-category-title h3 {
    font-size: 1.2rem;
    font-weight: 600;
    color: white;
    margin: 0;
}

.cookie-category-badge {
    background: rgba(16, 185, 129, 0.2);
    color: #10b981;
    padding: 0.25rem 0.75rem;
    border-radius: 20px;
    font-size: 0.85rem;
    font-weight: 500;
}

.cookie-category-desc {
    font-size: 0.95rem;
    color: rgba(255, 255, 255, 0.7);
    line-height: 1.6;
    margin: 0;
}

/* Cookie Toggle */
.cookie-toggle {
    position: relative;
    width: 56px;
    height: 30px;
    display: inline-block;
    cursor: pointer;
}

.cookie-toggle.disabled {
    opacity: 0.5;
    cursor: not-allowed;
}

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

.cookie-toggle-slider {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(255, 255, 255, 0.2);
    border-radius: 15px;
    transition: all 0.3s ease;
}

.cookie-toggle-slider::before {
    content: '';
    position: absolute;
    height: 22px;
    width: 22px;
    right: 4px;
    bottom: 4px;
    background: white;
    border-radius: 50%;
    transition: all 0.3s ease;
}

.cookie-toggle input:checked + .cookie-toggle-slider {
    background: linear-gradient(135deg, #8b5cf6, #ec4899);
}

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

.cookie-toggle input:focus + .cookie-toggle-slider {
    box-shadow: 0 0 0 3px rgba(139, 92, 246, 0.3);
}

/* Cookie Modal Info */
.cookie-modal-info {
    display: flex;
    gap: 1rem;
    padding: 1.5rem;
    background: rgba(59, 130, 246, 0.1);
    border: 1px solid rgba(59, 130, 246, 0.3);
    border-radius: 12px;
    margin-top: 2rem;
}

.cookie-modal-info svg {
    width: 24px;
    height: 24px;
    color: #3b82f6;
    flex-shrink: 0;
}

.cookie-modal-info p {
    margin: 0;
    font-size: 0.95rem;
    color: rgba(255, 255, 255, 0.8);
    line-height: 1.6;
}

/* Cookie Modal Footer */
.cookie-modal-footer {
    padding: 1.5rem 2rem;
    border-top: 1px solid rgba(255, 255, 255, 0.1);
    display: flex;
    gap: 1rem;
}

.cookie-modal-footer .cookie-btn {
    flex: 1;
}

/* Cookie Manage Button */
.cookie-manage-btn {
    position: fixed;
    bottom: 100px;
    right: 20px;
    z-index: 99997;
    padding: 0.75rem 1.5rem;
    background: rgba(139, 92, 246, 0.9);
    backdrop-filter: blur(10px);
    border: 1px solid rgba(139, 92, 246, 0.5);
    border-radius: 50px;
    color: white;
    cursor: pointer;
    transition: all 0.3s ease;
    display: flex;
    align-items: center;
    gap: 0.5rem;
    font-size: 0.95rem;
    font-weight: 500;
    box-shadow: 0 4px 20px rgba(139, 92, 246, 0.4);
}

.cookie-manage-btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 30px rgba(139, 92, 246, 0.6);
    background: rgba(139, 92, 246, 1);
}

.cookie-manage-btn:focus {
    outline: 3px solid #fbbf24;
    outline-offset: 2px;
}

.cookie-manage-btn svg {
    width: 20px;
    height: 20px;
}

/* Responsive */
@media (max-width: 992px) {
    .cookie-banner-content {
        grid-template-columns: 1fr;
        gap: 1.5rem;
    }

    .cookie-banner-icon {
        display: none;
    }

    .cookie-banner-actions {
        min-width: 100%;
    }

    .cookie-modal-content {
        width: 95%;
        max-height: 95vh;
    }
}

@media (max-width: 576px) {
    .cookie-banner {
        padding: 1.5rem;
    }

    .cookie-banner-text h3 {
        font-size: 1.2rem;
    }

    .cookie-banner-text p {
        font-size: 0.9rem;
    }

    .cookie-modal-header,
    .cookie-modal-body,
    .cookie-modal-footer {
        padding: 1.5rem;
    }

    .cookie-modal-header h2 {
        font-size: 1.4rem;
    }

    .cookie-modal-footer {
        flex-direction: column;
    }

    .cookie-manage-btn {
        bottom: 160px;
        right: 10px;
        padding: 0.6rem 1rem;
        font-size: 0.85rem;
    }

    .cookie-manage-btn span {
        display: none;
    }
}

/* Print */
@media print {
    .cookie-banner,
    .cookie-modal,
    .cookie-manage-btn {
        display: none !important;
    }
}

/* Focus Styles */
.cookie-btn:focus,
.cookie-modal-close:focus,
.cookie-manage-btn:focus {
    outline: 3px solid #fbbf24;
    outline-offset: 2px;
}

/* Animation for Banner */
@keyframes slideUp {
    from {
        transform: translateY(100%);
    }
    to {
        transform: translateY(0);
    }
}

