/**
 * Cookie Consent Banner Styles
 * DSGVO/GDPR compliant - Google Consent Mode v2
 */

/* Overlay */
.cc-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.6);
    z-index: 999998;
    opacity: 0;
    visibility: hidden;
    transition: opacity 0.3s ease, visibility 0.3s ease;
}

.cc-overlay.cc-visible {
    opacity: 1;
    visibility: visible;
}

/* Main Banner */
.cc-banner {
    position: fixed;
    bottom: 0;
    left: 0;
    right: 0;
    background: #fff;
    box-shadow: 0 -4px 20px rgba(0, 0, 0, 0.15);
    z-index: 999999;
    transform: translateY(100%);
    transition: transform 0.4s ease;
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
    font-size: 14px;
    line-height: 1.5;
    color: #333;
}

.cc-banner.cc-visible {
    transform: translateY(0);
}

.cc-banner-inner {
    max-width: 1200px;
    margin: 0 auto;
    padding: 20px 24px;
}

.cc-banner-content {
    display: flex;
    flex-wrap: wrap;
    align-items: flex-start;
    gap: 20px;
}

.cc-text {
    flex: 1;
    min-width: 280px;
}

.cc-title {
    font-size: 18px;
    font-weight: 600;
    margin: 0 0 8px 0;
    color: #1a1a1a;
}

.cc-description {
    margin: 0 0 12px 0;
    color: #555;
}

.cc-description a {
    color: #8B4513;
    text-decoration: underline;
}

.cc-description a:hover {
    color: #6B3510;
}

/* Buttons */
.cc-buttons {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    align-items: center;
}

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

.cc-btn-accept {
    background: #8B4513;
    color: #fff;
}

.cc-btn-accept:hover {
    background: #6B3510;
}

.cc-btn-reject {
    background: #f5f5f5;
    color: #333;
    border: 1px solid #ddd;
}

.cc-btn-reject:hover {
    background: #e8e8e8;
}

.cc-btn-settings {
    background: transparent;
    color: #8B4513;
    padding: 12px 16px;
    text-decoration: underline;
}

.cc-btn-settings:hover {
    color: #6B3510;
}

/* Settings Modal */
.cc-modal {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: 1000000;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 20px;
    box-sizing: border-box;
    opacity: 0;
    visibility: hidden;
    transition: opacity 0.3s ease, visibility 0.3s ease;
}

.cc-modal.cc-visible {
    opacity: 1;
    visibility: visible;
}

.cc-modal-overlay {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.7);
}

.cc-modal-content {
    position: relative;
    background: #fff;
    border-radius: 12px;
    max-width: 600px;
    width: 100%;
    max-height: 80vh;
    overflow: hidden;
    display: flex;
    flex-direction: column;
    box-shadow: 0 10px 40px rgba(0, 0, 0, 0.3);
    transform: scale(0.9);
    transition: transform 0.3s ease;
}

.cc-modal.cc-visible .cc-modal-content {
    transform: scale(1);
}

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

.cc-modal-title {
    font-size: 20px;
    font-weight: 600;
    margin: 0;
    color: #1a1a1a;
}

.cc-modal-close {
    background: none;
    border: none;
    font-size: 24px;
    cursor: pointer;
    color: #999;
    padding: 0;
    line-height: 1;
}

.cc-modal-close:hover {
    color: #333;
}

.cc-modal-body {
    padding: 24px;
    overflow-y: auto;
    flex: 1;
}

/* Category Cards */
.cc-category {
    background: #f8f9fa;
    border-radius: 8px;
    padding: 16px;
    margin-bottom: 16px;
}

.cc-category:last-child {
    margin-bottom: 0;
}

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

.cc-category-title {
    font-size: 16px;
    font-weight: 600;
    color: #1a1a1a;
    margin: 0;
}

.cc-category-description {
    color: #666;
    font-size: 13px;
    margin: 0;
}

/* Toggle Switch */
.cc-toggle {
    position: relative;
    width: 48px;
    height: 26px;
    flex-shrink: 0;
}

.cc-toggle input {
    opacity: 0;
    width: 0;
    height: 0;
}

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

.cc-toggle-slider:before {
    position: absolute;
    content: "";
    height: 20px;
    width: 20px;
    left: 3px;
    bottom: 3px;
    background-color: white;
    transition: 0.3s;
    border-radius: 50%;
    box-shadow: 0 2px 4px rgba(0,0,0,0.2);
}

.cc-toggle input:checked + .cc-toggle-slider {
    background-color: #8B4513;
}

.cc-toggle input:checked + .cc-toggle-slider:before {
    transform: translateX(22px);
}

.cc-toggle input:disabled + .cc-toggle-slider {
    background-color: #8B4513;
    opacity: 0.7;
    cursor: not-allowed;
}

/* Modal Footer */
.cc-modal-footer {
    padding: 16px 24px;
    border-top: 1px solid #eee;
    display: flex;
    justify-content: flex-end;
    gap: 10px;
    flex-wrap: wrap;
}

/* Settings Button (persistent) */
.cc-settings-btn {
    position: fixed;
    bottom: 20px;
    left: 20px;
    width: 44px;
    height: 44px;
    background: #8B4513;
    color: #fff;
    border: none;
    border-radius: 50%;
    cursor: pointer;
    z-index: 999990;
    display: flex;
    align-items: center;
    justify-content: center;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.2);
    transition: all 0.3s ease;
    opacity: 0;
    visibility: hidden;
}

.cc-settings-btn.cc-visible {
    opacity: 1;
    visibility: visible;
}

.cc-settings-btn:hover {
    background: #6B3510;
    transform: scale(1.1);
}

.cc-settings-btn svg {
    width: 20px;
    height: 20px;
}

/* Cookie Details (Expandable) */
.cc-cookie-details {
    margin-top: 12px;
    padding-top: 12px;
    border-top: 1px solid #ddd;
    font-size: 12px;
    color: #666;
}

.cc-cookie-details summary {
    cursor: pointer;
    color: #8B4513;
    font-weight: 500;
}

.cc-cookie-details summary:hover {
    color: #6B3510;
}

.cc-cookie-table {
    margin-top: 8px;
    width: 100%;
    border-collapse: collapse;
}

.cc-cookie-table th,
.cc-cookie-table td {
    padding: 6px 8px;
    text-align: left;
    border-bottom: 1px solid #eee;
}

.cc-cookie-table th {
    font-weight: 600;
    color: #333;
}

/* Responsive */
@media (max-width: 768px) {
    .cc-banner-inner {
        padding: 16px;
    }

    .cc-banner-content {
        flex-direction: column;
    }

    .cc-buttons {
        width: 100%;
        flex-direction: column;
    }

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

    .cc-modal-content {
        max-height: 90vh;
    }

    .cc-modal-footer {
        flex-direction: column;
    }

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

    .cc-settings-btn {
        bottom: 15px;
        left: 15px;
        width: 40px;
        height: 40px;
    }
}

/* Print */
@media print {
    .cc-banner,
    .cc-modal,
    .cc-overlay,
    .cc-settings-btn {
        display: none !important;
    }
}
