/**
 * BISpicy POS - Cookie Consent Styles
 * EU-DSGVO konformes Cookie-Banner
 */

/* Banner Container */
.cookie-banner {
    position: fixed;
    bottom: 0;
    left: 0;
    right: 0;
    background: linear-gradient(135deg, #1a1a2e 0%, #16213e 100%);
    color: #fff;
    padding: 20px;
    z-index: 99999;
    box-shadow: 0 -4px 20px rgba(0, 0, 0, 0.3);
    display: none;
    opacity: 0;
    transform: translateY(100%);
    transition: opacity 0.3s ease, transform 0.3s ease;
}

.cookie-banner.show {
    opacity: 1;
    transform: translateY(0);
}

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

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

.cookie-banner-text h4 {
    margin: 0 0 8px 0;
    font-size: 1.1rem;
    font-weight: 600;
    color: #fff;
}

.cookie-banner-text p {
    margin: 0 0 8px 0;
    font-size: 0.9rem;
    line-height: 1.5;
    color: rgba(255, 255, 255, 0.85);
}

.cookie-banner-text a {
    color: #3c85ac;
    text-decoration: none;
    font-size: 0.85rem;
}

.cookie-banner-text a:hover {
    text-decoration: underline;
}

/* Banner Buttons */
.cookie-banner-actions {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    align-items: center;
}

.cookie-btn {
    padding: 10px 20px;
    border: none;
    border-radius: 6px;
    font-size: 0.9rem;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.2s ease;
    white-space: nowrap;
}

.cookie-btn-accept {
    background: linear-gradient(135deg, #28a745 0%, #20c997 100%);
    color: #fff;
}

.cookie-btn-accept:hover {
    background: linear-gradient(135deg, #218838 0%, #1aa179 100%);
    transform: translateY(-1px);
}

.cookie-btn-settings {
    background: transparent;
    border: 2px solid rgba(255, 255, 255, 0.4);
    color: #fff;
}

.cookie-btn-settings:hover {
    border-color: #3c85ac;
    background: rgba(60, 133, 172, 0.1);
}

.cookie-btn-necessary {
    background: transparent;
    color: rgba(255, 255, 255, 0.7);
    padding: 10px 15px;
    text-decoration: underline;
}

.cookie-btn-necessary:hover {
    color: #fff;
}

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

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

.cookie-settings-content {
    background: #fff;
    border-radius: 12px;
    max-width: 550px;
    width: 100%;
    max-height: 90vh;
    overflow: hidden;
    display: flex;
    flex-direction: column;
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.3);
    transform: scale(0.9);
    transition: transform 0.3s ease;
}

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

.cookie-settings-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 20px 25px;
    border-bottom: 1px solid #e9ecef;
    background: #f8f9fa;
}

.cookie-settings-header h3 {
    margin: 0;
    font-size: 1.25rem;
    color: #1a1a2e;
}

.cookie-settings-close {
    background: none;
    border: none;
    font-size: 1.8rem;
    color: #6c757d;
    cursor: pointer;
    line-height: 1;
    padding: 0;
    width: 32px;
    height: 32px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 50%;
    transition: all 0.2s;
}

.cookie-settings-close:hover {
    background: #e9ecef;
    color: #1a1a2e;
}

.cookie-settings-body {
    padding: 20px 25px;
    overflow-y: auto;
    flex: 1;
}

/* Cookie Categories */
.cookie-category {
    padding: 15px 0;
    border-bottom: 1px solid #e9ecef;
}

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

.cookie-category-header {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 15px;
}

.cookie-category-info {
    flex: 1;
}

.cookie-category-info h5 {
    margin: 0 0 6px 0;
    font-size: 1rem;
    font-weight: 600;
    color: #1a1a2e;
}

.cookie-category-info p {
    margin: 0;
    font-size: 0.85rem;
    color: #6c757d;
    line-height: 1.4;
}

.cookie-details {
    margin-top: 8px;
}

.cookie-details small {
    color: #adb5bd;
    font-size: 0.8rem;
}

/* Toggle Switch */
.cookie-toggle {
    flex-shrink: 0;
}

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

.toggle-label {
    display: block;
    width: 50px;
    height: 28px;
    background: #dee2e6;
    border-radius: 14px;
    position: relative;
    cursor: pointer;
    transition: background 0.3s ease;
}

.toggle-label::after {
    content: '';
    position: absolute;
    top: 3px;
    left: 3px;
    width: 22px;
    height: 22px;
    background: #fff;
    border-radius: 50%;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.2);
    transition: transform 0.3s ease;
}

.cookie-toggle input[type="checkbox"]:checked + .toggle-label {
    background: linear-gradient(135deg, #28a745 0%, #20c997 100%);
}

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

.toggle-label.disabled {
    opacity: 0.6;
    cursor: not-allowed;
}

/* Settings Footer */
.cookie-settings-footer {
    display: flex;
    gap: 10px;
    padding: 20px 25px;
    border-top: 1px solid #e9ecef;
    background: #f8f9fa;
}

.cookie-btn-save {
    flex: 1;
    background: #3c85ac;
    color: #fff;
}

.cookie-btn-save:hover {
    background: #2d6a8a;
}

.cookie-btn-accept-all {
    flex: 1;
    background: linear-gradient(135deg, #28a745 0%, #20c997 100%);
    color: #fff;
}

.cookie-btn-accept-all:hover {
    background: linear-gradient(135deg, #218838 0%, #1aa179 100%);
}

/* Mobile Responsive */
@media (max-width: 768px) {
    .cookie-banner {
        padding: 15px;
    }

    .cookie-banner-content {
        flex-direction: column;
        text-align: center;
    }

    .cookie-banner-text {
        min-width: auto;
    }

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

    .cookie-btn {
        width: 100%;
    }

    .cookie-settings-content {
        max-height: 85vh;
        margin: 10px;
    }

    .cookie-settings-header,
    .cookie-settings-body,
    .cookie-settings-footer {
        padding: 15px 20px;
    }

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

    .cookie-category-header {
        flex-direction: column;
        gap: 10px;
    }

    .cookie-toggle {
        align-self: flex-start;
    }
}

/* Footer Link zum Oeffnen der Cookie-Einstellungen */
.cookie-settings-link {
    cursor: pointer;
    color: inherit;
    text-decoration: underline;
}

.cookie-settings-link:hover {
    color: #3c85ac;
}
