/**
 * Cookie Consent Banner Styles
 * DSGVO-konform für Computerservice Stahlberg
 */

/* ===================================
   Cookie Banner (Bottom)
   =================================== */
.cookie-banner {
    position: fixed;
    bottom: 0;
    left: 0;
    right: 0;
    background: linear-gradient(135deg, #1e3a5f 0%, #2563eb 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-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: 1.3rem;
    color: white;
}

.cookie-banner-text p {
    margin: 0;
    font-size: 0.95rem;
    line-height: 1.6;
    color: rgba(255, 255, 255, 0.95);
}

.cookie-banner-text a {
    color: #60d5f2;
    text-decoration: underline;
    font-weight: 500;
}

.cookie-banner-text a:hover {
    color: #ffffff;
}

.cookie-banner-actions {
    display: flex;
    gap: 12px;
    flex-shrink: 0;
}

.cookie-banner .btn {
    white-space: nowrap;
    padding: 12px 24px;
    font-size: 0.95rem;
    border-radius: 8px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.2s;
    border: 2px solid transparent;
}

.cookie-banner .btn-primary {
    background: white;
    color: #1e3a5f;
    border-color: white;
}

.cookie-banner .btn-primary:hover {
    background: #f3f4f6;
    transform: translateY(-1px);
}

.cookie-banner .btn-outline {
    background: transparent;
    color: white;
    border-color: white;
}

.cookie-banner .btn-outline:hover {
    background: rgba(255, 255, 255, 0.1);
}

.cookie-banner .btn-text {
    background: transparent;
    color: rgba(255, 255, 255, 0.9);
    border: none;
    text-decoration: underline;
}

.cookie-banner .btn-text:hover {
    color: white;
}

/* ===================================
   Cookie Modal
   =================================== */
.cookie-modal {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0, 0, 0, 0.6);
    z-index: 10000;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 20px;
    opacity: 0;
    transition: opacity 0.3s ease-out;
}

.cookie-modal.show {
    opacity: 1;
}

.cookie-modal-content {
    background: white;
    border-radius: 16px;
    max-width: 700px;
    width: 100%;
    max-height: 90vh;
    overflow-y: auto;
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.3);
    transform: scale(0.9);
    transition: transform 0.3s ease-out;
}

.cookie-modal.show .cookie-modal-content {
    transform: scale(1);
}

.cookie-modal-header {
    padding: 30px 30px 20px;
    border-bottom: 1px solid #e5e7eb;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.cookie-modal-header h2 {
    margin: 0;
    font-size: 1.8rem;
    color: #1e3a5f;
}

.cookie-modal-close {
    background: none;
    border: none;
    font-size: 2rem;
    color: #6b7280;
    cursor: pointer;
    width: 40px;
    height: 40px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 8px;
    transition: all 0.2s;
}

.cookie-modal-close:hover {
    background: #f3f4f6;
    color: #1f2937;
}

.cookie-modal-body {
    padding: 30px;
}

.cookie-category {
    padding: 20px;
    background: #f9fafb;
    border-radius: 12px;
    margin-bottom: 20px;
    border: 2px solid #e5e7eb;
}

.cookie-category-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 12px;
}

.cookie-category h3 {
    margin: 0;
    font-size: 1.2rem;
    color: #1e3a5f;
}

.cookie-category p {
    margin: 0 0 8px 0;
    color: #4b5563;
    line-height: 1.6;
}

.cookie-category small {
    color: #6b7280;
    font-size: 0.85rem;
}

/* Toggle Switch */
.cookie-switch {
    position: relative;
    display: inline-block;
    width: 52px;
    height: 28px;
}

.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: #d1d5db;
    transition: 0.3s;
    border-radius: 28px;
}

.cookie-slider:before {
    position: absolute;
    content: "";
    height: 20px;
    width: 20px;
    left: 4px;
    bottom: 4px;
    background-color: white;
    transition: 0.3s;
    border-radius: 50%;
}

.cookie-switch input:checked + .cookie-slider {
    background-color: #2563eb;
}

.cookie-switch input:checked + .cookie-slider:before {
    transform: translateX(24px);
}

.cookie-switch input:disabled + .cookie-slider {
    opacity: 0.6;
    cursor: not-allowed;
}

.cookie-modal-footer {
    padding: 20px 30px 30px;
    display: flex;
    gap: 12px;
    justify-content: flex-end;
    border-top: 1px solid #e5e7eb;
}

.cookie-modal-footer .btn {
    padding: 12px 28px;
    border-radius: 8px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.2s;
    border: 2px solid transparent;
    font-size: 1rem;
}

.cookie-modal-footer .btn-primary {
    background: #2563eb;
    color: white;
    border-color: #2563eb;
}

.cookie-modal-footer .btn-primary:hover {
    background: #1e40af;
    border-color: #1e40af;
    transform: translateY(-1px);
    box-shadow: 0 4px 12px rgba(37, 99, 235, 0.3);
}

.cookie-modal-footer .btn-outline {
    background: white;
    color: #2563eb;
    border-color: #2563eb;
}

.cookie-modal-footer .btn-outline:hover {
    background: #eff6ff;
}

/* ===================================
   Cookie Settings Button (Fixed)
   =================================== */
.cookie-settings-btn {
    position: fixed;
    bottom: 20px;
    left: 20px;
    width: 50px;
    height: 50px;
    background: #2563eb;
    color: white;
    border: none;
    border-radius: 50%;
    font-size: 1.5rem;
    cursor: pointer;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.2);
    z-index: 9998;
    transition: all 0.3s;
    display: flex;
    align-items: center;
    justify-content: center;
}

.cookie-settings-btn:hover {
    background: #1e40af;
    transform: scale(1.1);
    box-shadow: 0 6px 20px rgba(37, 99, 235, 0.4);
}

.cookie-settings-btn:active {
    transform: scale(0.95);
}

/* ===================================
   Animations
   =================================== */
@keyframes slideInLeft {
    from {
        transform: translateX(-400px);
        opacity: 0;
    }
    to {
        transform: translateX(0);
        opacity: 1;
    }
}

@keyframes slideOutLeft {
    from {
        transform: translateX(0);
        opacity: 1;
    }
    to {
        transform: translateX(-400px);
        opacity: 0;
    }
}

/* ===================================
   Responsive Design
   =================================== */
@media (max-width: 768px) {
    .cookie-banner-content {
        flex-direction: column;
        gap: 20px;
    }

    .cookie-banner-actions {
        width: 100%;
        flex-direction: column;
    }

    .cookie-banner .btn {
        width: 100%;
        text-align: center;
    }

    .cookie-modal-content {
        margin: 20px;
        max-height: calc(100vh - 40px);
    }

    .cookie-modal-header {
        padding: 20px;
    }

    .cookie-modal-body {
        padding: 20px;
    }

    .cookie-modal-footer {
        padding: 15px 20px 20px;
        flex-direction: column;
    }

    .cookie-modal-footer .btn {
        width: 100%;
    }

    .cookie-settings-btn {
        bottom: 15px;
        left: 15px;
        width: 45px;
        height: 45px;
        font-size: 1.3rem;
    }

    .cookie-category-header {
        flex-direction: column;
        align-items: flex-start;
        gap: 12px;
    }
}

/* ===================================
   Print Styles
   =================================== */
@media print {
    .cookie-banner,
    .cookie-modal,
    .cookie-settings-btn {
        display: none !important;
    }
}
