/* Cookie Manager Styles */

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

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

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

.cookie-banner-text {
    flex: 1;
    min-width: 300px;
}

.cookie-banner h3 {
    font-size: 1.25rem;
    font-weight: 600;
    margin-bottom: 8px;
    color: #f1f5f9;
}

.cookie-banner p {
    font-size: 0.95rem;
    color: #cbd5e1;
    line-height: 1.5;
    margin-bottom: 0;
}

.cookie-banner-actions {
    display: flex;
    gap: 12px;
    flex-wrap: wrap;
    align-items: center;
}

.cookie-btn {
    padding: 10px 20px;
    border: none;
    border-radius: 8px;
    font-weight: 500;
    font-size: 0.9rem;
    cursor: pointer;
    transition: all 0.2s ease;
    text-decoration: none;
    display: inline-flex;
    align-items: center;
    gap: 6px;
    white-space: nowrap;
}

.cookie-btn-primary {
    background: #015CDE;
    color: white;
}

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

.cookie-btn-secondary {
    background: transparent;
    color: #cbd5e1;
    border: 1px solid #475569;
}

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

.cookie-btn-accept {
    background: #10b981;
    color: white;
}

.cookie-btn-accept:hover {
    background: #059669;
    transform: translateY(-1px);
}

/* Cookie Modal */
.cookie-modal-overlay {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0, 0, 0, 0.7);
    z-index: 1100;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 20px;
    opacity: 0;
    visibility: hidden;
    transition: all 0.3s ease;
}

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

.cookie-modal {
    background: white;
    border-radius: 16px;
    max-width: 600px;
    width: 100%;
    max-height: 90vh;
    overflow-y: auto;
    box-shadow: 0 20px 40px rgba(0, 0, 0, 0.2);
    transform: scale(0.9) translateY(20px);
    transition: transform 0.3s ease;
}

.cookie-modal-overlay.show .cookie-modal {
    transform: scale(1) translateY(0);
}

.cookie-modal-header {
    padding: 24px 24px 0;
    border-bottom: 1px solid #e2e8f0;
    margin-bottom: 24px;
}

.cookie-modal-title {
    font-size: 1.5rem;
    font-weight: 700;
    color: #1e293b;
    margin-bottom: 8px;
    display: flex;
    align-items: center;
    gap: 10px;
}

.cookie-modal-subtitle {
    color: #64748b;
    font-size: 0.95rem;
    line-height: 1.5;
    margin-bottom: 16px;
}

.cookie-modal-close {
    position: absolute;
    top: 20px;
    right: 20px;
    background: none;
    border: none;
    font-size: 1.5rem;
    color: #64748b;
    cursor: pointer;
    padding: 8px;
    border-radius: 8px;
    transition: all 0.2s ease;
}

.cookie-modal-close:hover {
    background: #f1f5f9;
    color: #1e293b;
}

.cookie-modal-content {
    padding: 0 24px 24px;
}

/* Cookie Categories */
.cookie-category {
    border: 1px solid #e2e8f0;
    border-radius: 12px;
    margin-bottom: 16px;
    overflow: hidden;
    transition: border-color 0.2s ease;
}

.cookie-category:hover {
    border-color: #cbd5e1;
}

.cookie-category-header {
    padding: 20px;
    background: #f8fafc;
    display: flex;
    align-items: center;
    justify-content: space-between;
    cursor: pointer;
    transition: background-color 0.2s ease;
}

.cookie-category-header:hover {
    background: #f1f5f9;
}

.cookie-category-info {
    flex: 1;
}

.cookie-category-title {
    font-size: 1.1rem;
    font-weight: 600;
    color: #1e293b;
    margin-bottom: 4px;
    display: flex;
    align-items: center;
    gap: 8px;
}

.cookie-category-description {
    color: #64748b;
    font-size: 0.9rem;
    line-height: 1.4;
}

.cookie-category-toggle {
    display: flex;
    align-items: center;
    gap: 12px;
}

/* Toggle Switch */
.cookie-toggle {
    position: relative;
    width: 50px;
    height: 26px;
    background: #cbd5e1;
    border-radius: 13px;
    cursor: pointer;
    transition: background-color 0.3s ease;
}

.cookie-toggle.active {
    background: #015CDE;
}

.cookie-toggle.disabled {
    background: #e2e8f0;
    cursor: not-allowed;
}

.cookie-toggle-slider {
    position: absolute;
    top: 2px;
    left: 2px;
    width: 22px;
    height: 22px;
    background: white;
    border-radius: 50%;
    transition: transform 0.3s ease;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
}

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

.cookie-toggle-label {
    font-size: 0.85rem;
    color: #64748b;
    font-weight: 500;
}

.cookie-toggle.disabled .cookie-toggle-label {
    color: #94a3b8;
}

/* Cookie Details */
.cookie-category-details {
    padding: 0 20px 20px;
    border-top: 1px solid #e2e8f0;
    background: white;
    display: none;
}

.cookie-category.expanded .cookie-category-details {
    display: block;
}

.cookie-category-details h4 {
    font-size: 1rem;
    font-weight: 600;
    color: #1e293b;
    margin: 16px 0 8px;
}

.cookie-category-details p {
    color: #64748b;
    font-size: 0.9rem;
    line-height: 1.5;
    margin-bottom: 12px;
}

.cookie-list {
    list-style: none;
    padding: 0;
    margin: 0;
}

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

.cookie-item:last-child {
    border-bottom: none;
}

.cookie-name {
    font-weight: 500;
    color: #1e293b;
    font-size: 0.9rem;
}

.cookie-purpose {
    color: #64748b;
    font-size: 0.85rem;
    flex: 1;
    margin-left: 12px;
}

.cookie-duration {
    color: #94a3b8;
    font-size: 0.8rem;
    font-weight: 500;
}

/* Modal Actions */
.cookie-modal-actions {
    padding: 20px 24px;
    border-top: 1px solid #e2e8f0;
    background: #f8fafc;
    display: flex;
    gap: 12px;
    justify-content: flex-end;
    flex-wrap: wrap;
}

.cookie-modal-actions .cookie-btn {
    min-width: 120px;
    justify-content: center;
}

/* Cookie Manager Link */
.cookie-manager-link {
    position: fixed;
    bottom: 20px;
    left: 20px;
    background: #1e293b;
    color: white;
    padding: 12px 16px;
    border-radius: 8px;
    text-decoration: none;
    font-size: 0.9rem;
    font-weight: 500;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
    transition: all 0.3s ease;
    z-index: 999;
    display: flex;
    align-items: center;
    gap: 8px;
}

.cookie-manager-link:hover {
    background: #334155;
    transform: translateY(-2px);
    box-shadow: 0 6px 16px rgba(0, 0, 0, 0.2);
    color: white;
    text-decoration: none;
}

/* Status Indicators */
.cookie-status {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 4px 8px;
    border-radius: 6px;
    font-size: 0.8rem;
    font-weight: 500;
}

.cookie-status.required {
    background: #fef3c7;
    color: #92400e;
}

.cookie-status.enabled {
    background: #d1fae5;
    color: #065f46;
}

.cookie-status.disabled {
    background: #fee2e2;
    color: #991b1b;
}

/* Responsive Design */
@media (max-width: 768px) {
    .cookie-banner-content {
        flex-direction: column;
        align-items: stretch;
        gap: 16px;
    }
    
    .cookie-banner-actions {
        justify-content: center;
    }
    
    .cookie-modal {
        margin: 10px;
        max-height: calc(100vh - 20px);
    }
    
    .cookie-modal-header {
        padding: 20px 20px 0;
    }
    
    .cookie-modal-content {
        padding: 0 20px 20px;
    }
    
    .cookie-modal-actions {
        padding: 16px 20px;
        flex-direction: column;
    }
    
    .cookie-modal-actions .cookie-btn {
        width: 100%;
    }
    
    .cookie-category-header {
        padding: 16px;
    }
    
    .cookie-category-details {
        padding: 0 16px 16px;
    }
    
    .cookie-manager-link {
        bottom: 10px;
        left: 10px;
        right: 10px;
        text-align: center;
        justify-content: center;
    }
}

@media (max-width: 480px) {
    .cookie-banner {
        padding: 16px;
    }
    
    .cookie-banner h3 {
        font-size: 1.1rem;
    }
    
    .cookie-banner p {
        font-size: 0.9rem;
    }
    
    .cookie-btn {
        padding: 8px 16px;
        font-size: 0.85rem;
    }
    
    .cookie-modal-title {
        font-size: 1.3rem;
    }
    
    .cookie-category-title {
        font-size: 1rem;
    }
}

/* Animation for expand/collapse */
.cookie-category-details {
    animation: slideDown 0.3s ease;
}

@keyframes slideDown {
    from {
        opacity: 0;
        transform: translateY(-10px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* Loading state */
.cookie-loading {
    opacity: 0.6;
    pointer-events: none;
}

.cookie-loading::after {
    content: '';
    position: absolute;
    top: 50%;
    left: 50%;
    width: 20px;
    height: 20px;
    margin: -10px 0 0 -10px;
    border: 2px solid #015CDE;
    border-top: 2px solid transparent;
    border-radius: 50%;
    animation: spin 1s linear infinite;
}

@keyframes spin {
    0% { transform: rotate(0deg); }
    100% { transform: rotate(360deg); }
}