/* GDPR Cookie Consent Styles for DevSafe */

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

.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;
}

.cookie-banner-text {
    flex: 1;
}

.cookie-banner-text h3 {
    margin: 0 0 8px 0;
    font-size: 1.2rem;
    font-weight: 600;
    display: flex;
    align-items: center;
    gap: 8px;
}

.cookie-banner-text p {
    margin: 0;
    font-size: 0.95rem;
    opacity: 0.9;
    line-height: 1.4;
}

.cookie-banner-actions {
    display: flex;
    gap: 12px;
    flex-shrink: 0;
}

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

.btn-primary {
    background: #fbbf24;
    color: #1f2937;
}

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

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

.btn-secondary:hover {
    background: rgba(255, 255, 255, 0.3);
    transform: translateY(-1px);
}

.btn-outline {
    background: transparent;
    color: white;
    border: 2px solid rgba(255, 255, 255, 0.5);
}

.btn-outline:hover {
    background: rgba(255, 255, 255, 0.1);
    border-color: rgba(255, 255, 255, 0.8);
    transform: translateY(-1px);
}

/* Cookie Modal */
.cookie-modal {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    z-index: 10001;
    opacity: 0;
    visibility: hidden;
    transition: all 0.3s ease;
}

.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.6);
    backdrop-filter: blur(4px);
}

.cookie-modal-content {
    position: relative;
    background: white;
    max-width: 600px;
    margin: 50px auto;
    border-radius: 12px;
    box-shadow: 0 20px 40px rgba(0, 0, 0, 0.2);
    transform: translateY(20px);
    transition: transform 0.3s ease;
    max-height: calc(100vh - 100px);
    overflow: hidden;
    display: flex;
    flex-direction: column;
}

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

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

.cookie-modal-header h2 {
    margin: 0;
    font-size: 1.5rem;
    color: #1f2937;
    display: flex;
    align-items: center;
    gap: 8px;
}

.close-btn {
    background: none;
    border: none;
    font-size: 1.2rem;
    color: #6b7280;
    cursor: pointer;
    padding: 4px;
    border-radius: 4px;
    transition: all 0.2s ease;
}

.close-btn:hover {
    background: #f3f4f6;
    color: #374151;
}

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

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

.cookie-category {
    margin-bottom: 24px;
    padding: 16px;
    border: 1px solid #e5e7eb;
    border-radius: 8px;
    transition: border-color 0.2s ease;
}

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

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

.cookie-category h3 {
    margin: 0;
    font-size: 1.1rem;
    color: #1f2937;
    font-weight: 600;
}

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

/* Toggle Switch */
.cookie-toggle {
    position: relative;
    display: inline-block;
    width: 50px;
    height: 24px;
    cursor: pointer;
}

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

.toggle-slider {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background-color: #cbd5e1;
    border-radius: 24px;
    transition: 0.3s;
}

.toggle-slider:before {
    position: absolute;
    content: "";
    height: 18px;
    width: 18px;
    left: 3px;
    bottom: 3px;
    background-color: white;
    border-radius: 50%;
    transition: 0.3s;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.2);
}

input:checked + .toggle-slider {
    background-color: #4c4f7d;
}

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

input:disabled + .toggle-slider {
    background-color: #9ca3af;
    cursor: not-allowed;
}

.cookie-modal-footer {
    padding: 16px 24px 24px 24px;
    border-top: 1px solid #e5e7eb;
    display: flex;
    gap: 12px;
    justify-content: flex-end;
}

/* Notification */
.cookie-notification {
    position: fixed;
    top: 20px;
    right: 20px;
    background: white;
    padding: 16px 20px;
    border-radius: 8px;
    box-shadow: 0 10px 25px rgba(0, 0, 0, 0.15);
    display: flex;
    align-items: center;
    gap: 10px;
    z-index: 10002;
    transform: translateX(100%);
    transition: transform 0.3s ease;
    border-left: 4px solid #10b981;
}

.cookie-notification.show {
    transform: translateX(0);
}

.cookie-notification.success {
    border-left-color: #10b981;
    color: #065f46;
}

.cookie-notification.info {
    border-left-color: #3b82f6;
    color: #1e40af;
}

.cookie-notification i {
    font-size: 1.1rem;
}

/* Responsive Design */
@media (max-width: 768px) {
    .cookie-banner-content {
        flex-direction: column;
        text-align: center;
        gap: 16px;
    }
    
    .cookie-banner-actions {
        flex-direction: column;
        width: 100%;
    }
    
    .cookie-banner-actions .btn {
        width: 100%;
        justify-content: center;
    }
    
    .cookie-modal-content {
        margin: 20px;
        max-height: calc(100vh - 40px);
    }
    
    .cookie-modal-footer {
        flex-direction: column;
    }
    
    .cookie-modal-footer .btn {
        width: 100%;
        justify-content: center;
    }
    
    .cookie-category-header {
        flex-direction: column;
        align-items: flex-start;
        gap: 8px;
    }
    
    .cookie-notification {
        right: 10px;
        left: 10px;
        transform: translateY(-100%);
    }
    
    .cookie-notification.show {
        transform: translateY(0);
    }
}

@media (max-width: 480px) {
    .cookie-banner {
        padding: 16px;
    }
    
    .cookie-modal-content {
        margin: 10px;
        max-height: calc(100vh - 20px);
    }
    
    .cookie-modal-header,
    .cookie-modal-body,
    .cookie-modal-footer {
        padding: 16px;
    }
}

/* Accessibility */
@media (prefers-reduced-motion: reduce) {
    .cookie-banner,
    .cookie-modal,
    .cookie-modal-content,
    .cookie-notification,
    .btn,
    .toggle-slider,
    .toggle-slider:before {
        transition: none;
    }
}

/* High contrast mode */
@media (prefers-contrast: high) {
    .cookie-banner {
        border: 2px solid white;
    }
    
    .cookie-modal-content {
        border: 2px solid #000;
    }
    
    .cookie-category {
        border-width: 2px;
    }
}

/* Focus styles for accessibility */
.btn:focus,
.close-btn:focus,
.cookie-toggle:focus-within {
    outline: 2px solid #4c4f7d;
    outline-offset: 2px;
}

.cookie-toggle input:focus + .toggle-slider {
    box-shadow: 0 0 0 2px #4c4f7d;
}