/* 
 * Consent Management System Styles
 * DSGVO-konformes Cookie-Banner und Einstellungen
 */

/* ===== Cookie Banner ===== */
.consent-banner {
    position: fixed;
    bottom: 0;
    left: 0;
    right: 0;
    background: linear-gradient(135deg, #2b2b2b 0%, #1a1a1a 100%);
    color: #ffffff;
    padding: 1.5rem;
    box-shadow: 0 -4px 20px rgba(0, 0, 0, 0.3);
    z-index: 10000;
    transform: translateY(100%);
    transition: transform 0.4s cubic-bezier(0.4, 0, 0.2, 1);
    border-top: 3px solid #0078d4;
}

.consent-banner.show {
    transform: translateY(0);
}

.consent-banner.hide {
    transform: translateY(100%);
}

.consent-content {
    max-width: 1200px;
    margin: 0 auto;
    display: flex;
    align-items: center;
    gap: 2rem;
    flex-wrap: wrap;
}

.consent-text {
    flex: 1;
    min-width: 300px;
}

.consent-text h3 {
    margin: 0 0 0.5rem 0;
    font-size: 1.2rem;
    color: #ffffff;
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.consent-text h3 i {
    color: #0078d4;
}

.consent-text p {
    margin: 0;
    font-size: 0.95rem;
    line-height: 1.5;
    opacity: 0.9;
}

.consent-text a {
    color: #4ca6e5;
    text-decoration: underline;
}

.consent-text a:hover {
    color: #ffffff;
}

.consent-actions {
    display: flex;
    gap: 1rem;
    flex-wrap: wrap;
    align-items: center;
}

.consent-btn {
    padding: 0.75rem 1.5rem;
    border: none;
    border-radius: 6px;
    font-size: 0.95rem;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.3s ease;
    text-decoration: none;
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    white-space: nowrap;
}

.consent-btn-accept {
    background: linear-gradient(135deg, #0078d4 0%, #005a9e 100%);
    color: #ffffff;
    box-shadow: 0 2px 8px rgba(0, 120, 212, 0.3);
}

.consent-btn-accept:hover {
    background: linear-gradient(135deg, #005a9e 0%, #004578 100%);
    transform: translateY(-1px);
    box-shadow: 0 4px 12px rgba(0, 120, 212, 0.4);
}

.consent-btn-decline {
    background: transparent;
    color: #ffffff;
    border: 2px solid rgba(255, 255, 255, 0.3);
}

.consent-btn-decline:hover {
    background: rgba(255, 255, 255, 0.1);
    border-color: rgba(255, 255, 255, 0.5);
}

.consent-btn-settings {
    background: transparent;
    color: #4ca6e5;
    border: 2px solid #4ca6e5;
}

.consent-btn-settings:hover {
    background: #4ca6e5;
    color: #ffffff;
}

/* ===== Consent Modal ===== */
.consent-modal {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.7);
    backdrop-filter: blur(4px);
    z-index: 10001;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 1rem;
    opacity: 0;
    visibility: hidden;
    transition: all 0.3s ease;
}

.consent-modal.show {
    opacity: 1;
    visibility: visible;
}

.consent-modal-content {
    background: #ffffff;
    border-radius: 12px;
    max-width: 800px;
    width: 100%;
    max-height: 90vh;
    overflow-y: auto;
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.3);
    transform: scale(0.9) translateY(20px);
    transition: transform 0.3s ease;
}

.consent-modal.show .consent-modal-content {
    transform: scale(1) translateY(0);
}

.consent-modal-header {
    padding: 2rem 2rem 1rem;
    border-bottom: 1px solid #e0e0e0;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.consent-modal-header h2 {
    margin: 0;
    color: #2b2b2b;
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.consent-modal-header h2 i {
    color: #0078d4;
}

.consent-modal-close {
    background: none;
    border: none;
    font-size: 1.5rem;
    color: #757575;
    cursor: pointer;
    padding: 0.5rem;
    border-radius: 50%;
    transition: all 0.3s ease;
}

.consent-modal-close:hover {
    background: #f5f5f5;
    color: #2b2b2b;
}

.consent-modal-body {
    padding: 1rem 2rem 2rem;
}

.consent-intro {
    margin-bottom: 2rem;
    padding: 1.5rem;
    background: linear-gradient(135deg, #f8f9fa 0%, #e9ecef 100%);
    border-radius: 8px;
    border-left: 4px solid #0078d4;
}

.consent-intro p {
    margin: 0;
    color: #495057;
    line-height: 1.6;
}

/* ===== Cookie Categories ===== */
.consent-categories {
    display: flex;
    flex-direction: column;
    gap: 1.5rem;
}

.consent-category {
    border: 1px solid #e0e0e0;
    border-radius: 8px;
    overflow: hidden;
    transition: all 0.3s ease;
}

.consent-category:hover {
    border-color: #0078d4;
    box-shadow: 0 2px 8px rgba(0, 120, 212, 0.1);
}

.consent-category-header {
    padding: 1.5rem;
    background: #f8f9fa;
    display: flex;
    justify-content: space-between;
    align-items: center;
    cursor: pointer;
    transition: background-color 0.3s ease;
}

.consent-category-header:hover {
    background: #e9ecef;
}

.consent-category-info {
    display: flex;
    align-items: center;
    gap: 1rem;
    flex: 1;
}

.consent-category-icon {
    width: 40px;
    height: 40px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.2rem;
    color: #ffffff;
}

.consent-category-icon.essential {
    background: linear-gradient(135deg, #28a745 0%, #20c997 100%);
}

.consent-category-icon.functional {
    background: linear-gradient(135deg, #0078d4 0%, #4ca6e5 100%);
}

.consent-category-icon.analytics {
    background: linear-gradient(135deg, #ffc107 0%, #fd7e14 100%);
}

.consent-category-icon.marketing {
    background: linear-gradient(135deg, #dc3545 0%, #e83e8c 100%);
}

.consent-category-title {
    flex: 1;
}

.consent-category-title h3 {
    margin: 0 0 0.25rem 0;
    font-size: 1.1rem;
    color: #2b2b2b;
}

.consent-category-title p {
    margin: 0;
    font-size: 0.9rem;
    color: #6c757d;
}

.consent-category-controls {
    display: flex;
    align-items: center;
    gap: 1rem;
}

.consent-toggle {
    position: relative;
    display: inline-block;
    width: 50px;
    height: 26px;
}

.consent-toggle input {
    opacity: 0;
    width: 0;
    height: 0;
}

.consent-toggle-slider {
    position: absolute;
    cursor: pointer;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background-color: #ccc;
    transition: 0.3s;
    border-radius: 26px;
}

.consent-toggle-slider:before {
    position: absolute;
    content: "";
    height: 20px;
    width: 20px;
    left: 3px;
    bottom: 3px;
    background-color: white;
    transition: 0.3s;
    border-radius: 50%;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.2);
}

.consent-toggle input:checked + .consent-toggle-slider {
    background-color: #0078d4;
}

.consent-toggle input:checked + .consent-toggle-slider:before {
    transform: translateX(24px);
}

.consent-toggle input:disabled + .consent-toggle-slider {
    background-color: #28a745;
    cursor: not-allowed;
}

.consent-expand-btn {
    background: none;
    border: none;
    color: #0078d4;
    cursor: pointer;
    padding: 0.5rem;
    border-radius: 4px;
    transition: all 0.3s ease;
}

.consent-expand-btn:hover {
    background: rgba(0, 120, 212, 0.1);
}

.consent-expand-btn i {
    transition: transform 0.3s ease;
}

.consent-category.expanded .consent-expand-btn i {
    transform: rotate(180deg);
}

.consent-category-details {
    max-height: 0;
    overflow: hidden;
    transition: max-height 0.3s ease;
}

.consent-category.expanded .consent-category-details {
    max-height: 500px;
}

.consent-category-content {
    padding: 1.5rem;
    border-top: 1px solid #e0e0e0;
    background: #ffffff;
}

.consent-services {
    display: flex;
    flex-direction: column;
    gap: 1rem;
}

.consent-service {
    padding: 1rem;
    background: #f8f9fa;
    border-radius: 6px;
    border-left: 3px solid #0078d4;
}

.consent-service h4 {
    margin: 0 0 0.5rem 0;
    font-size: 1rem;
    color: #2b2b2b;
}

.consent-service p {
    margin: 0 0 0.5rem 0;
    font-size: 0.9rem;
    color: #6c757d;
    line-height: 1.5;
}

.consent-service-info {
    display: flex;
    flex-wrap: wrap;
    gap: 1rem;
    font-size: 0.85rem;
    color: #6c757d;
}

.consent-service-info span {
    display: flex;
    align-items: center;
    gap: 0.25rem;
}

.consent-service-info i {
    color: #0078d4;
}

/* ===== Modal Footer ===== */
.consent-modal-footer {
    padding: 1.5rem 2rem;
    border-top: 1px solid #e0e0e0;
    background: #f8f9fa;
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 1rem;
    flex-wrap: wrap;
}

.consent-modal-actions {
    display: flex;
    gap: 1rem;
    flex-wrap: wrap;
}

.consent-save-btn {
    background: linear-gradient(135deg, #0078d4 0%, #005a9e 100%);
    color: #ffffff;
    border: none;
    padding: 0.75rem 2rem;
    border-radius: 6px;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.3s ease;
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.consent-save-btn:hover {
    background: linear-gradient(135deg, #005a9e 0%, #004578 100%);
    transform: translateY(-1px);
    box-shadow: 0 4px 12px rgba(0, 120, 212, 0.3);
}

.consent-accept-all-btn {
    background: linear-gradient(135deg, #28a745 0%, #20c997 100%);
    color: #ffffff;
    border: none;
    padding: 0.75rem 1.5rem;
    border-radius: 6px;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.3s ease;
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.consent-accept-all-btn:hover {
    background: linear-gradient(135deg, #20c997 0%, #17a2b8 100%);
    transform: translateY(-1px);
    box-shadow: 0 4px 12px rgba(40, 167, 69, 0.3);
}

.consent-decline-all-btn {
    background: transparent;
    color: #6c757d;
    border: 2px solid #dee2e6;
    padding: 0.75rem 1.5rem;
    border-radius: 6px;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.3s ease;
}

.consent-decline-all-btn:hover {
    background: #f8f9fa;
    border-color: #adb5bd;
    color: #495057;
}

/* ===== Consent Settings Link ===== */
.consent-settings-link {
    position: fixed;
    bottom: 20px;
    left: 20px;
    background: rgba(43, 43, 43, 0.9);
    color: #ffffff;
    padding: 0.75rem 1rem;
    border-radius: 25px;
    text-decoration: none;
    font-size: 0.9rem;
    font-weight: 500;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.3);
    backdrop-filter: blur(10px);
    transition: all 0.3s ease;
    z-index: 9999;
    display: flex;
    align-items: center;
    gap: 0.5rem;
    opacity: 0;
    transform: translateX(-100px);
}

.consent-settings-link.show {
    opacity: 1;
    transform: translateX(0);
}

.consent-settings-link:hover {
    background: rgba(0, 120, 212, 0.9);
    transform: translateX(0) translateY(-2px);
    box-shadow: 0 6px 16px rgba(0, 120, 212, 0.4);
    color: #ffffff;
}

/* ===== Responsive Design ===== */
@media (max-width: 768px) {
    .consent-banner {
        padding: 1rem;
    }
    
    .consent-content {
        flex-direction: column;
        gap: 1rem;
        text-align: center;
    }
    
    .consent-text {
        min-width: auto;
    }
    
    .consent-actions {
        justify-content: center;
        width: 100%;
    }
    
    .consent-btn {
        flex: 1;
        min-width: 120px;
        justify-content: center;
    }
    
    .consent-modal-content {
        margin: 0.5rem;
        max-height: 95vh;
    }
    
    .consent-modal-header,
    .consent-modal-body,
    .consent-modal-footer {
        padding-left: 1rem;
        padding-right: 1rem;
    }
    
    .consent-category-header {
        padding: 1rem;
    }
    
    .consent-category-info {
        gap: 0.75rem;
    }
    
    .consent-category-controls {
        gap: 0.5rem;
    }
    
    .consent-modal-footer {
        flex-direction: column;
        align-items: stretch;
    }
    
    .consent-modal-actions {
        justify-content: center;
    }
    
    .consent-settings-link {
        bottom: 10px;
        left: 10px;
        padding: 0.5rem 0.75rem;
        font-size: 0.8rem;
    }
}

@media (max-width: 480px) {
    .consent-actions {
        flex-direction: column;
    }
    
    .consent-btn {
        width: 100%;
    }
    
    .consent-category-header {
        flex-direction: column;
        align-items: flex-start;
        gap: 1rem;
    }
    
    .consent-category-controls {
        align-self: flex-end;
    }
    
    .consent-modal-actions {
        flex-direction: column;
    }
    
    .consent-save-btn,
    .consent-accept-all-btn,
    .consent-decline-all-btn {
        width: 100%;
        justify-content: center;
    }
}

/* ===== Accessibility ===== */
@media (prefers-reduced-motion: reduce) {
    .consent-banner,
    .consent-modal,
    .consent-modal-content,
    .consent-toggle-slider,
    .consent-toggle-slider:before,
    .consent-category-details,
    .consent-expand-btn i,
    .consent-settings-link {
        transition: none;
    }
}

.consent-banner:focus-within,
.consent-modal:focus-within {
    outline: 2px solid #0078d4;
    outline-offset: 2px;
}

.consent-btn:focus,
.consent-modal-close:focus,
.consent-toggle:focus-within,
.consent-expand-btn:focus,
.consent-save-btn:focus,
.consent-accept-all-btn:focus,
.consent-decline-all-btn:focus {
    outline: 2px solid #0078d4;
    outline-offset: 2px;
}

/* ===== Print Styles ===== */
@media print {
    .consent-banner,
    .consent-modal,
    .consent-settings-link {
        display: none !important;
    }
}
