/* CMP — Minimal Cookie Consent Styles */

/* Overlay behind modal */
.cmp-overlay {
    display: none;
    position: fixed;
    inset: 0;
    background: rgba(0, 0, 0, 0.5);
    z-index: 99998;
}
.cmp-overlay.cmp-visible { display: block; }

/* Banner — fixed bottom */
.cmp-banner {
    display: none;
    position: fixed;
    bottom: 0;
    left: 0;
    right: 0;
    z-index: 99999;
    background: #fff;
    border-top: 1px solid #d0d0d0;
    box-shadow: 0 -2px 12px rgba(0, 0, 0, 0.15);
    padding: 16px 24px;
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
    font-size: 14px;
    line-height: 1.5;
    color: #333;
}
.cmp-banner.cmp-visible { display: block; }

.cmp-banner-inner {
    max-width: 1200px;
    margin: 0 auto;
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 16px;
}

.cmp-banner-text {
    flex: 1 1 400px;
}

.cmp-banner-text a {
    color: #0066cc;
    text-decoration: underline;
}

.cmp-banner-actions {
    flex: 0 0 auto;
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
}

/* Buttons */
.cmp-btn {
    display: inline-block;
    padding: 8px 20px;
    border: 1px solid #ccc;
    border-radius: 4px;
    font-size: 14px;
    font-weight: 500;
    cursor: pointer;
    background: #f5f5f5;
    color: #333;
    transition: background 0.15s, border-color 0.15s;
    white-space: nowrap;
}
.cmp-btn:hover, .cmp-btn:focus-visible {
    background: #e8e8e8;
    border-color: #aaa;
    outline: 2px solid #0066cc;
    outline-offset: 2px;
}

.cmp-btn-accept {
    background: #2a7d2a;
    color: #fff;
    border-color: #2a7d2a;
}
.cmp-btn-accept:hover, .cmp-btn-accept:focus-visible {
    background: #236b23;
    border-color: #236b23;
}

.cmp-btn-reject {
    background: #fff;
    color: #333;
}

/* Modal */
.cmp-modal {
    display: none;
    position: fixed;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    z-index: 99999;
    background: #fff;
    border-radius: 8px;
    box-shadow: 0 4px 24px rgba(0, 0, 0, 0.25);
    width: 90%;
    max-width: 560px;
    max-height: 85vh;
    overflow-y: auto;
    padding: 24px;
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
    font-size: 14px;
    color: #333;
}
.cmp-modal.cmp-visible { display: block; }

.cmp-modal-title {
    font-size: 18px;
    font-weight: 600;
    margin: 0 0 16px 0;
}

.cmp-modal-close {
    position: absolute;
    top: 12px;
    right: 16px;
    background: none;
    border: none;
    font-size: 22px;
    cursor: pointer;
    color: #666;
    padding: 4px 8px;
    line-height: 1;
}
.cmp-modal-close:hover, .cmp-modal-close:focus-visible {
    color: #000;
    outline: 2px solid #0066cc;
    outline-offset: 2px;
}

/* Category rows */
.cmp-category {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    padding: 12px 0;
    border-bottom: 1px solid #eee;
}
.cmp-category:last-child { border-bottom: none; }

.cmp-category-info {
    flex: 1;
    padding-right: 16px;
}

.cmp-category-name {
    font-weight: 600;
    margin-bottom: 4px;
}

.cmp-category-desc {
    font-size: 13px;
    color: #666;
}

/* Toggle switch */
.cmp-toggle {
    position: relative;
    width: 44px;
    height: 24px;
    flex-shrink: 0;
    margin-top: 2px;
}
.cmp-toggle input {
    opacity: 0;
    width: 0;
    height: 0;
    position: absolute;
}
.cmp-toggle-slider {
    position: absolute;
    inset: 0;
    background: #ccc;
    border-radius: 24px;
    cursor: pointer;
    transition: background 0.2s;
}
.cmp-toggle-slider::after {
    content: '';
    position: absolute;
    width: 18px;
    height: 18px;
    left: 3px;
    bottom: 3px;
    background: #fff;
    border-radius: 50%;
    transition: transform 0.2s;
}
.cmp-toggle input:checked + .cmp-toggle-slider {
    background: #2a7d2a;
}
.cmp-toggle input:checked + .cmp-toggle-slider::after {
    transform: translateX(20px);
}
.cmp-toggle input:disabled + .cmp-toggle-slider {
    opacity: 0.6;
    cursor: not-allowed;
}
.cmp-toggle input:focus-visible + .cmp-toggle-slider {
    outline: 2px solid #0066cc;
    outline-offset: 2px;
}

.cmp-modal-actions {
    margin-top: 20px;
    display: flex;
    justify-content: flex-end;
    gap: 8px;
}

/* Manage cookies link */
.cmp-manage-link {
    cursor: pointer;
    color: #0066cc;
    text-decoration: underline;
    font-size: 13px;
    background: none;
    border: none;
    padding: 0;
    font-family: inherit;
}
.cmp-manage-link:hover { color: #004c99; }

/* Responsive */
@media (max-width: 600px) {
    .cmp-banner { padding: 12px 16px; }
    .cmp-banner-inner { flex-direction: row; align-items: center; }
    .cmp-banner-actions { justify-content: stretch; }
    .cmp-banner-actions .cmp-btn { flex: 1; text-align: center; }
    .cmp-modal { width: 95%; padding: 16px; }
}
