/**
 * Cookie Consent Styles for GaLa-Bau Kiki
 * DSGVO-konformes Cookie-Banner mit Modal
 */

/* ========================================
   Cookie Banner
   ======================================== */
.cookie-banner {
    position: fixed;
    bottom: 0;
    left: 0;
    right: 0;
    z-index: 9999;
    padding: 1.5rem;
    animation: slideUp 0.4s ease;
}

@keyframes slideUp {
    from {
        transform: translateY(100%);
        opacity: 0;
    }
    to {
        transform: translateY(0);
        opacity: 1;
    }
}

.cookie-banner-container {
    max-width: 1200px;
    margin: 0 auto;
}

.cookie-banner-card {
    background: white;
    border-radius: 12px;
    box-shadow: 0 -4px 20px rgba(0, 0, 0, 0.15);
    border: 2px solid var(--color-primary-light);
    padding: 1.5rem;
}

.cookie-banner-content {
    display: grid;
    grid-template-columns: auto 1fr auto;
    gap: 1.5rem;
    align-items: center;
}

.cookie-icon {
    font-size: 3rem;
    color: var(--color-primary);
}

.cookie-icon i {
    display: block;
}

.cookie-text h3 {
    font-size: 1.25rem;
    font-weight: 700;
    color: var(--color-primary);
    margin: 0 0 0.5rem 0;
}

.cookie-description {
    font-size: 0.95rem;
    color: var(--color-text-light);
    line-height: 1.6;
    margin: 0;
}

.cookie-link {
    color: var(--color-primary);
    font-weight: 600;
    text-decoration: underline;
}

.cookie-link:hover {
    color: var(--color-primary-light);
}

.cookie-actions {
    display: flex;
    flex-direction: column;
    gap: 0.75rem;
    white-space: nowrap;
}

.btn-cookie-accept {
    background: linear-gradient(135deg, var(--color-primary), var(--color-primary-light));
    color: white;
    border: none;
    padding: 12px 28px;
    border-radius: 8px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
    font-size: 0.95rem;
}

.btn-cookie-accept:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(46, 125, 50, 0.3);
}

.btn-cookie-necessary {
    background: transparent;
    color: var(--color-primary);
    border: 2px solid var(--color-primary);
    padding: 10px 28px;
    border-radius: 8px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
    font-size: 0.95rem;
}

.btn-cookie-necessary:hover {
    background: var(--color-primary);
    color: white;
}

.btn-cookie-settings {
    background: transparent;
    color: var(--color-primary);
    border: none;
    padding: 10px 28px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
    font-size: 0.95rem;
    text-decoration: underline;
}

.btn-cookie-settings:hover {
    color: var(--color-primary-light);
}

/* ========================================
   Cookie Modal
   ======================================== */
.cookie-modal {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    z-index: 10000;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 1.5rem;
}

.cookie-modal-backdrop {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0, 0, 0, 0.7);
    animation: fadeIn 0.3s ease;
}

@keyframes fadeIn {
    from { opacity: 0; }
    to { opacity: 1; }
}

.cookie-modal-content {
    position: relative;
    background: white;
    border-radius: 16px;
    max-width: 600px;
    width: 100%;
    max-height: 90vh;
    overflow-y: auto;
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.3);
    animation: scaleIn 0.3s ease;
    z-index: 1;
}

@keyframes scaleIn {
    from {
        transform: scale(0.9);
        opacity: 0;
    }
    to {
        transform: scale(1);
        opacity: 1;
    }
}

.cookie-modal-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 2rem;
    border-bottom: 2px solid var(--color-bg);
}

.cookie-modal-header h2 {
    margin: 0;
    font-size: 1.75rem;
    color: var(--color-primary);
}

.cookie-modal-close {
    background: none;
    border: none;
    font-size: 1.5rem;
    color: var(--color-text-light);
    cursor: pointer;
    width: 40px;
    height: 40px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 50%;
    transition: all 0.3s ease;
}

.cookie-modal-close:hover {
    background: var(--color-bg);
    color: var(--color-primary);
    transform: rotate(90deg);
}

.cookie-modal-body {
    padding: 2rem;
}

.cookie-modal-intro {
    margin-bottom: 2rem;
    color: var(--color-text-light);
    line-height: 1.6;
}

.cookie-category {
    margin-bottom: 1.5rem;
    padding: 1.25rem;
    background: var(--color-bg);
    border-radius: 12px;
    border: 2px solid transparent;
    transition: all 0.3s ease;
}

.cookie-category:hover {
    border-color: var(--color-primary-light);
}

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

.cookie-category-info {
    display: flex;
    align-items: center;
    gap: 1rem;
}

.cookie-category h4 {
    margin: 0;
    font-size: 1.1rem;
    color: var(--color-primary);
}

.cookie-badge {
    font-size: 0.75rem;
    padding: 0.25rem 0.75rem;
    border-radius: 20px;
    background: var(--color-primary-light);
    color: white;
    font-weight: 600;
}

.cookie-badge-required {
    background: var(--color-text-light);
}

.cookie-category-description {
    margin: 0;
    font-size: 0.9rem;
    color: var(--color-text-light);
    line-height: 1.5;
}

/* ========================================
   Toggle Switch
   ======================================== */
.cookie-switch {
    position: relative;
    display: inline-block;
    width: 60px;
    height: 30px;
    flex-shrink: 0;
}

.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.4s;
    border-radius: 30px;
}

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

.cookie-switch input:checked + .cookie-slider {
    background-color: var(--color-primary);
}

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

.cookie-switch input:disabled + .cookie-slider {
    opacity: 0.5;
    cursor: not-allowed;
}

/* ========================================
   Modal Footer
   ======================================== */
.cookie-modal-footer {
    display: flex;
    justify-content: flex-end;
    gap: 1rem;
    padding: 1.5rem 2rem;
    border-top: 2px solid var(--color-bg);
}

.btn-cookie-cancel {
    background: transparent;
    color: var(--color-text-light);
    border: 2px solid var(--color-border);
    padding: 12px 24px;
    border-radius: 8px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
}

.btn-cookie-cancel:hover {
    border-color: var(--color-primary);
    color: var(--color-primary);
}

.btn-cookie-save {
    background: linear-gradient(135deg, var(--color-primary), var(--color-primary-light));
    color: white;
    border: none;
    padding: 12px 28px;
    border-radius: 8px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
}

.btn-cookie-save:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(46, 125, 50, 0.3);
}

/* ========================================
   Mobile Responsive
   ======================================== */
@media (max-width: 768px) {
    .cookie-banner {
        padding: 1rem;
    }
    
    .cookie-banner-card {
        padding: 1.25rem;
    }
    
    .cookie-banner-content {
        grid-template-columns: 1fr;
        gap: 1rem;
        text-align: center;
    }
    
    .cookie-icon {
        font-size: 2.5rem;
        justify-self: center;
    }
    
    .cookie-actions {
        width: 100%;
    }
    
    .btn-cookie-accept,
    .btn-cookie-necessary,
    .btn-cookie-settings {
        width: 100%;
    }
    
    /* Mobile Modal */
    .cookie-modal {
        padding: 0;
    }
    
    .cookie-modal-content {
        max-height: 100vh;
        border-radius: 0;
    }
    
    .cookie-modal-header,
    .cookie-modal-body,
    .cookie-modal-footer {
        padding: 1.5rem;
    }
    
    .cookie-modal-footer {
        flex-direction: column;
    }
    
    .btn-cookie-cancel,
    .btn-cookie-save {
        width: 100%;
    }
}
