/**
 * GDPR Cookie Consent Styles
 * Professional B2B Design with Apple-inspired aesthetics
 * Responsive design for mobile and desktop
 */

/* Cookie Banner Styles */
.cookie-consent-banner {
    position: fixed;
    bottom: 0;
    left: 0;
    right: 0;
    background: rgba(255, 255, 255, 0.95);
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    border-top: 1px solid rgba(0, 0, 0, 0.1);
    box-shadow: 0 -4px 20px rgba(0, 0, 0, 0.1);
    z-index: 10000;
    transform: translateY(0);
    transition: transform 0.3s cubic-bezier(0.25, 0.46, 0.45, 0.94);
    padding: 20px 0;
}

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

.cookie-consent-content {
    display: flex;
    align-items: center;
    gap: 16px;
    flex: 1;
}

.cookie-consent-icon {
    width: 48px;
    height: 48px;
    background: linear-gradient(135deg, #10b981, #059669);
    border-radius: 12px;
    display: flex;
    align-items: center;
    justify-content: center;
    color: white;
    flex-shrink: 0;
}

.cookie-consent-text h3 {
    font-size: 18px;
    font-weight: 600;
    color: #1f2937;
    margin: 0 0 4px 0;
    line-height: 1.3;
}

.cookie-consent-text p {
    font-size: 14px;
    color: #6b7280;
    margin: 0;
    line-height: 1.4;
    max-width: 600px;
}

.cookie-consent-actions {
    display: flex;
    align-items: center;
    gap: 12px;
    flex-shrink: 0;
}

/* Cookie Button Styles */
.cookie-btn {
    padding: 12px 24px;
    border-radius: 8px;
    font-size: 14px;
    font-weight: 500;
    border: none;
    cursor: pointer;
    transition: all 0.2s ease;
    white-space: nowrap;
    text-decoration: none;
    display: inline-flex;
    align-items: center;
    justify-content: center;
}

.cookie-btn-primary {
    background: linear-gradient(135deg, #10b981, #059669);
    color: white;
    box-shadow: 0 2px 4px rgba(16, 185, 129, 0.2);
}

.cookie-btn-primary:hover {
    background: linear-gradient(135deg, #059669, #047857);
    box-shadow: 0 4px 8px rgba(16, 185, 129, 0.3);
    transform: translateY(-1px);
}

.cookie-btn-secondary {
    background: rgba(107, 114, 128, 0.1);
    color: #374151;
    border: 1px solid rgba(107, 114, 128, 0.2);
}

.cookie-btn-secondary:hover {
    background: rgba(107, 114, 128, 0.15);
    border-color: rgba(107, 114, 128, 0.3);
}

.cookie-btn-text {
    background: transparent;
    color: #6b7280;
    padding: 12px 16px;
}

.cookie-btn-text:hover {
    color: #374151;
    background: rgba(107, 114, 128, 0.05);
}

/* Cookie Settings Modal */
.cookie-modal-overlay {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0, 0, 0, 0.5);
    backdrop-filter: blur(4px);
    -webkit-backdrop-filter: blur(4px);
    z-index: 10001;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 20px;
    opacity: 1;
    transition: opacity 0.3s ease;
}

.cookie-modal {
    background: white;
    border-radius: 16px;
    box-shadow: 0 20px 40px rgba(0, 0, 0, 0.15);
    max-width: 600px;
    width: 100%;
    max-height: 90vh;
    overflow: hidden;
    display: flex;
    flex-direction: column;
}

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

.cookie-modal-header h2 {
    font-size: 20px;
    font-weight: 600;
    color: #1f2937;
    margin: 0;
}

.cookie-modal-close {
    width: 32px;
    height: 32px;
    border: none;
    background: rgba(107, 114, 128, 0.1);
    border-radius: 8px;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    color: #6b7280;
    transition: all 0.2s ease;
}

.cookie-modal-close:hover {
    background: rgba(107, 114, 128, 0.2);
    color: #374151;
}

.cookie-modal-content {
    padding: 24px;
    overflow-y: auto;
    flex: 1;
}

.cookie-modal-description {
    font-size: 14px;
    color: #6b7280;
    margin: 0 0 24px 0;
    line-height: 1.5;
}

/* Cookie Category Styles */
.cookie-category {
    margin-bottom: 24px;
    padding: 20px;
    background: #f9fafb;
    border-radius: 12px;
    border: 1px solid #f3f4f6;
}

.cookie-category:last-child {
    margin-bottom: 0;
}

.cookie-category-header {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 16px;
}

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

.cookie-category-info h3 {
    font-size: 16px;
    font-weight: 600;
    color: #1f2937;
    margin: 0 0 8px 0;
}

.cookie-category-info p {
    font-size: 14px;
    color: #6b7280;
    margin: 0;
    line-height: 1.4;
}

/* Toggle Switch Styles */
.cookie-toggle {
    flex-shrink: 0;
}

.cookie-toggle input[type="checkbox"] {
    display: none;
}

.toggle-label {
    display: block;
    width: 48px;
    height: 28px;
    background: #d1d5db;
    border-radius: 14px;
    position: relative;
    cursor: pointer;
    transition: background-color 0.3s ease;
}

.toggle-label:hover {
    background: #9ca3af;
}

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

input[type="checkbox"]:checked + .toggle-label {
    background: #10b981;
}

input[type="checkbox"]:checked + .toggle-label:hover {
    background: #059669;
}

input[type="checkbox"]:checked + .toggle-label .toggle-slider {
    transform: translateX(20px);
}

input[type="checkbox"]:disabled + .toggle-label {
    background: #10b981;
    cursor: not-allowed;
    opacity: 0.7;
}

input[type="checkbox"]:disabled + .toggle-label:hover {
    background: #10b981;
}

/* Modal Footer */
.cookie-modal-footer {
    padding: 0 24px 24px 24px;
    display: flex;
    gap: 12px;
    justify-content: flex-end;
}

.cookie-modal-links {
    padding: 0 24px 24px 24px;
    text-align: center;
    font-size: 12px;
    color: #9ca3af;
}

.cookie-modal-links a {
    color: #10b981;
    text-decoration: none;
    transition: color 0.2s ease;
}

.cookie-modal-links a:hover {
    color: #059669;
    text-decoration: underline;
}

.cookie-modal-links span {
    margin: 0 8px;
}

/* Responsive Design */
@media (max-width: 768px) {
    .cookie-consent-container {
        flex-direction: column;
        align-items: stretch;
        gap: 16px;
        padding: 0 16px;
    }
    
    .cookie-consent-content {
        flex-direction: column;
        align-items: flex-start;
        gap: 12px;
    }
    
    .cookie-consent-icon {
        width: 40px;
        height: 40px;
    }
    
    .cookie-consent-text h3 {
        font-size: 16px;
    }
    
    .cookie-consent-text p {
        font-size: 13px;
    }
    
    .cookie-consent-actions {
        flex-direction: column;
        width: 100%;
        gap: 8px;
    }
    
    .cookie-btn {
        width: 100%;
        justify-content: center;
        padding: 14px 20px;
    }
    
    .cookie-modal {
        margin: 10px;
        max-height: calc(100vh - 20px);
    }
    
    .cookie-modal-header {
        padding: 20px 20px 0 20px;
    }
    
    .cookie-modal-content {
        padding: 20px;
    }
    
    .cookie-modal-footer {
        padding: 0 20px 20px 20px;
        flex-direction: column;
    }
    
    .cookie-modal-links {
        padding: 0 20px 20px 20px;
    }
    
    .cookie-category {
        padding: 16px;
    }
    
    .cookie-category-header {
        flex-direction: column;
        gap: 12px;
    }
    
    .cookie-toggle {
        align-self: flex-start;
    }
}

@media (max-width: 480px) {
    .cookie-consent-banner {
        padding: 16px 0;
    }
    
    .cookie-modal {
        margin: 5px;
        border-radius: 12px;
    }
    
    .cookie-modal-header h2 {
        font-size: 18px;
    }
    
    .cookie-category-info h3 {
        font-size: 15px;
    }
    
    .cookie-category-info p {
        font-size: 13px;
    }
}

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

.cookie-consent-banner {
    animation: slideUp 0.3s cubic-bezier(0.25, 0.46, 0.45, 0.94);
}

/* Focus styles for accessibility */
.cookie-btn:focus,
.cookie-modal-close:focus,
.toggle-label:focus {
    outline: 2px solid #10b981;
    outline-offset: 2px;
}

/* High contrast mode support */
@media (prefers-contrast: high) {
    .cookie-consent-banner {
        border-top: 2px solid #000;
    }
    
    .cookie-btn-primary {
        background: #000;
        color: #fff;
    }
    
    .cookie-btn-secondary {
        border: 2px solid #000;
        color: #000;
    }
}
