/**
 * Cookie Consent Banner Styles
 * DSGVO-konform für Marleo Handarbeit
 */

/* Cookie Banner */
.cookie-banner {
    position: fixed;
    bottom: 0;
    left: 0;
    right: 0;
    background: linear-gradient(135deg, #8B4F9C 0%, #6B3F7C 100%);
    color: white;
    padding: 20px;
    box-shadow: 0 -4px 20px rgba(0, 0, 0, 0.2);
    z-index: 9999;
    transform: translateY(100%);
    transition: transform 0.3s ease-in-out;
}

.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: 30px;
}

.cookie-banner-text h3 {
    margin: 0 0 10px 0;
    font-size: 20px;
    font-weight: 600;
}

.cookie-banner-text p {
    margin: 0;
    font-size: 14px;
    line-height: 1.6;
    opacity: 0.95;
}

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

.cookie-banner .btn {
    padding: 12px 24px;
    border: none;
    border-radius: 6px;
    font-size: 14px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
    white-space: nowrap;
}

.cookie-banner .btn-primary {
    background: white;
    color: #8B4F9C;
}

.cookie-banner .btn-primary:hover {
    background: #f0f0f0;
    transform: translateY(-2px);
}

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

.cookie-banner .btn-secondary:hover {
    background: rgba(255, 255, 255, 0.3);
}

.cookie-banner .btn-link {
    background: transparent;
    color: white;
    text-decoration: underline;
    padding: 12px 16px;
}

.cookie-banner .btn-link:hover {
    opacity: 0.8;
}

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

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

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

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

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

.cookie-modal-header h2 {
    margin: 0;
    font-size: 24px;
    color: #333;
}

.cookie-modal-close {
    background: none;
    border: none;
    font-size: 32px;
    color: #999;
    cursor: pointer;
    padding: 0;
    width: 32px;
    height: 32px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 4px;
    transition: all 0.2s;
}

.cookie-modal-close:hover {
    background: #f0f0f0;
    color: #333;
}

.cookie-modal-body {
    padding: 24px;
}

.cookie-category {
    margin-bottom: 24px;
    padding-bottom: 24px;
    border-bottom: 1px solid #e0e0e0;
}

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

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

.cookie-category-header h4 {
    margin: 0;
    font-size: 16px;
    color: #333;
    font-weight: 600;
}

.cookie-category-description {
    margin: 0;
    font-size: 14px;
    line-height: 1.6;
    color: #666;
}

/* Toggle Switch */
.cookie-switch {
    position: relative;
    display: inline-block;
    width: 50px;
    height: 26px;
}

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

.cookie-slider {
    position: absolute;
    cursor: pointer;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background-color: #ccc;
    transition: 0.3s;
    border-radius: 26px;
}

.cookie-slider:before {
    position: absolute;
    content: "";
    height: 18px;
    width: 18px;
    left: 4px;
    bottom: 4px;
    background-color: white;
    transition: 0.3s;
    border-radius: 50%;
}

.cookie-switch input:checked + .cookie-slider {
    background-color: #8B4F9C;
}

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

.cookie-switch input:disabled + .cookie-slider {
    background-color: #4CAF50;
    cursor: not-allowed;
}

/* Modal Footer */
.cookie-modal-footer {
    padding: 24px;
    border-top: 1px solid #e0e0e0;
    display: flex;
    gap: 12px;
    justify-content: flex-end;
}

.cookie-modal-footer .btn {
    padding: 12px 24px;
    border: none;
    border-radius: 6px;
    font-size: 14px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
}

.cookie-modal-footer .btn-primary {
    background: #8B4F9C;
    color: white;
}

.cookie-modal-footer .btn-primary:hover {
    background: #7B3F8C;
}

.cookie-modal-footer .btn-secondary {
    background: #f0f0f0;
    color: #333;
}

.cookie-modal-footer .btn-secondary:hover {
    background: #e0e0e0;
}

/* Responsive Design */
@media (max-width: 768px) {
    .cookie-banner-content {
        flex-direction: column;
        align-items: stretch;
        gap: 20px;
    }

    .cookie-banner-actions {
        flex-direction: column;
    }

    .cookie-banner .btn {
        width: 100%;
        text-align: center;
    }

    .cookie-modal-content {
        margin: 10px;
        max-height: calc(100vh - 20px);
    }

    .cookie-modal-header {
        padding: 16px;
    }

    .cookie-modal-body {
        padding: 16px;
    }

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

    .cookie-modal-footer .btn {
        width: 100%;
    }
}

/* Accessibility */
.cookie-banner:focus-within,
.cookie-modal:focus-within {
    outline: 2px solid #8B4F9C;
    outline-offset: 2px;
}

.btn:focus {
    outline: 2px solid #8B4F9C;
    outline-offset: 2px;
}

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