/**
 * Cookie Banner CSS
 * Thai4 Restaurant - GDPR Cookie Consent
 * 
 * Design-Integration mit Thai4-Farben und Bootstrap 5
 */

/* ==================== CSS VARIABLES ==================== */
:root {
    /* Cookie Banner spezifische Farben */
    --cookie-bg: var(--thai-dark-green);
    /* Thai Dark Green */
    --cookie-text: #f8f5f0;
    /* Thai Cream */
    --cookie-accent: #d4af37;
    /* Thai Gold */
    --cookie-overlay: rgba(0, 0, 0, 0.7);
    --cookie-border: rgba(212, 175, 55, 0.3);
}

/* ==================== KOMPAKT BANNER ==================== */
.cookie-banner {
    position: fixed;
    bottom: 0;
    left: 0;
    right: 0;
    background: var(--cookie-bg);
    color: var(--cookie-text);
    padding: 1.5rem;
    box-shadow: 0 -4px 20px rgba(0, 0, 0, 0.3);
    z-index: 9999;
    border-top: 3px solid var(--cookie-accent);
    animation: slideUp 0.4s ease-out;
}

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

    to {
        transform: translateY(0);
        opacity: 1;
    }
}

.cookie-banner-content {
    max-width: 1200px;
    margin: 0 auto;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 2rem;
    flex-wrap: wrap;
}

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

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

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

.cookie-banner-actions {
    display: flex;
    gap: 0.75rem;
    flex-wrap: wrap;
}

/* ==================== BUTTONS ==================== */
.btn-cookie {
    padding: 0.625rem 1.25rem;
    border: none;
    border-radius: 4px;
    font-size: 0.95rem;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.3s ease;
    white-space: nowrap;
}

.btn-cookie:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.2);
}

.btn-accept {
    background: var(--cookie-accent);
    color: var(--cookie-bg);
}

.btn-accept:hover {
    background: #e5c050;
}

.btn-reject {
    background: transparent;
    color: var(--cookie-text);
    border: 1px solid var(--cookie-border);
}

.btn-reject:hover {
    border-color: var(--cookie-accent);
    background: rgba(212, 175, 55, 0.1);
}

.btn-settings {
    background: transparent;
    color: var(--cookie-accent);
    border: 1px solid var(--cookie-accent);
}

.btn-settings:hover {
    background: var(--cookie-accent);
    color: var(--cookie-bg);
}

/* ==================== SETTINGS MODAL ==================== */
.cookie-settings-modal {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    z-index: 10000;
}

.cookie-settings-modal.active {
    display: block;
}

.cookie-settings-overlay {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: var(--cookie-overlay);
    animation: fadeIn 0.3s ease;
}

@keyframes fadeIn {
    from {
        opacity: 0;
    }

    to {
        opacity: 1;
    }
}

.cookie-settings-content {
    position: relative;
    max-width: 700px;
    max-height: 90vh;
    margin: 5vh auto;
    background: var(--cookie-text);
    border-radius: 8px;
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.4);
    display: flex;
    flex-direction: column;
    animation: modalSlideIn 0.4s ease-out;
    overflow: hidden;
}

@keyframes modalSlideIn {
    from {
        transform: translateY(-50px);
        opacity: 0;
    }

    to {
        transform: translateY(0);
        opacity: 1;
    }
}

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

.cookie-settings-header h2 {
    margin: 0;
    font-size: 2.5rem;
    color: var(--text-light);
}

.cookie-settings-close {
    background: transparent;
    border: none;
    color: var(--cookie-text);
    font-size: 1.5rem;
    cursor: pointer;
    padding: 0.25rem;
    width: 32px;
    height: 32px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 4px;
    transition: all 0.2s ease;
}

.cookie-settings-close:hover {
    background: rgba(212, 175, 55, 0.2);
    color: var(--cookie-accent);
}

.cookie-settings-body {
    padding: 1.5rem;
    overflow-y: auto;
    flex: 1;
}

.cookie-settings-description {
    color: #333;
    margin-bottom: 1.5rem;
    line-height: 1.6;
}

/* ==================== COOKIE CATEGORIES ==================== */
.cookie-category {
    background: #fff;
    border: 1px solid #e0e0e0;
    border-radius: 6px;
    padding: 1.25rem;
    margin-bottom: 1rem;
    transition: all 0.2s ease;
}

.cookie-category:hover {
    border-color: var(--cookie-accent);
    box-shadow: 0 2px 8px rgba(212, 175, 55, 0.1);
}

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

.cookie-category-title {
    display: flex;
    align-items: center;
    gap: 0.75rem;
}

.cookie-category-title i {
    color: var(--cookie-accent);
    font-size: 1.25rem;
}

.cookie-category-title h3 {
    margin: 0;
    font-size: 2.1rem;
    color: var(--cookie-bg);

}

.cookie-category-description {
    color: #666;
    font-size: 0.9rem;
    line-height: 1.5;
}

.cookie-category-description p {
    margin: 0;
}

/* ==================== TOGGLE SWITCH ==================== */
.cookie-toggle {
    display: flex;
    align-items: center;
    gap: 0.75rem;
}

.cookie-toggle input[type="checkbox"] {
    display: none;
}

.toggle-label {
    position: relative;
    width: 50px;
    height: 26px;
    background: #ccc;
    border-radius: 13px;
    cursor: pointer;
    transition: background 0.3s ease;
}

.toggle-label:hover {
    background: #b8b8b8;
}

.toggle-switch {
    position: absolute;
    top: 3px;
    left: 3px;
    width: 20px;
    height: 20px;
    background: white;
    border-radius: 50%;
    transition: transform 0.3s ease;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.2);
}

input[type="checkbox"]:checked+.toggle-label {
    background: var(--cookie-accent);
}

input[type="checkbox"]:checked+.toggle-label .toggle-switch {
    transform: translateX(24px);
}

input[type="checkbox"]:disabled+.toggle-label {
    background: var(--cookie-accent);
    cursor: not-allowed;
    opacity: 0.7;
}

.always-active {
    font-size: 0.85rem;
    color: #666;
    font-style: italic;
}

/* ==================== MODAL FOOTER ==================== */
.cookie-settings-footer {
    background: #f5f5f5;
    padding: 1.25rem 1.5rem;
    display: flex;
    gap: 0.75rem;
    justify-content: flex-end;
    border-top: 1px solid #e0e0e0;
}

.btn-settings-reject {
    background: transparent;
    color: #666;
    border: 1px solid #ccc;
}

.btn-settings-reject:hover {
    border-color: #999;
    color: #333;
}

.btn-settings-save {
    background: var(--cookie-accent);
    color: white;
}

.btn-settings-save:hover {
    background: #e5c050;
}

.btn-settings-accept {
    background: var(--cookie-bg);
    color: var(--cookie-text);
}

.btn-settings-accept:hover {
    background: #234723;
}

/* ==================== RESPONSIVE DESIGN ==================== */
@media (max-width: 768px) {
    .cookie-banner {
        padding: 1rem;
    }

    .cookie-banner-content {
        flex-direction: column;
        gap: 1rem;
    }

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

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

    .cookie-settings-content {
        margin: 2vh auto;
        max-height: 96vh;
        border-radius: 0;
    }

    .cookie-settings-body {
        padding: 1rem;
    }

    .cookie-settings-footer {
        flex-direction: column;
    }

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

    .cookie-category {
        padding: 1rem;
    }
}

@media (max-width: 480px) {
    .cookie-banner-text h3 {
        font-size: 1.1rem;
    }

    .cookie-banner-text p {
        font-size: 0.9rem;
    }

    .cookie-settings-header h2 {
        font-size: 1.25rem;
    }

    .cookie-category-title h3 {
        font-size: 1.1rem;
    }
}