/* ============================================================
   Complianz-style Cookie Consent Banner
   Add to your main CSS file or a dedicated cookie-consent.css
   ============================================================ */

#cmplz-cookiebanner-container {
    position: fixed;
    bottom: 24px;
    left: 24px;
    z-index: 99999;
    max-width: 380px;
    width: calc(100% - 48px);
}

.cmplz-cookiebanner {
    background: #fff;
    border: 1px solid #e0e0e0;
    border-radius: 8px;
    box-shadow: 0 4px 20px rgba(0,0,0,.12);
    font-family: inherit;
    font-size: 13px;
    color: #333;
    line-height: 1.5;
}

/* Header */
.cmplz-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 14px 16px 0;
}

.cmplz-title {
    font-size: 14px;
    font-weight: 600;
    color: #1a1a1a;
}

.cmplz-close {
    background: none;
    border: none;
    cursor: pointer;
    color: #888;
    padding: 4px;
    border-radius: 4px;
    display: flex;
    align-items: center;
    line-height: 1;
}

.cmplz-close:hover { color: #333; background: #f5f5f5; }

/* Divider */
.cmplz-divider {
    height: 1px;
    background: #efefef;
    margin: 12px 0;
}

/* Body */
.cmplz-body { padding: 0 16px; }

.cmplz-message {
    font-size: 13px;
    color: #555;
    margin-bottom: 12px;
}

/* Categories */
.cmplz-categories { margin: 0; }

.cmplz-category {
    border-bottom: 1px solid #f0f0f0;
}

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

.cmplz-category summary {
    list-style: none;
    cursor: pointer;
    padding: 9px 0;
    user-select: none;
}

.cmplz-category summary::-webkit-details-marker { display: none; }

.cmplz-category-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 8px;
}

.cmplz-category-title {
    font-size: 13px;
    font-weight: 600;
    flex: 1;
}

.cmplz-always-active {
    font-size: 11px;
    color: #2e7d32;
    font-weight: 500;
}

.cmplz-icon {
    font-size: 16px;
    color: #999;
    margin-left: 4px;
    transition: transform .2s;
}

details[open] .cmplz-icon { transform: rotate(180deg); }

.cmplz-description {
    font-size: 12px;
    color: #666;
    padding: 0 0 10px;
    line-height: 1.5;
}

.cmplz-banner-checkbox {
    position: relative;
    display: inline-block;
    width: 48px;
    height: 34px;
    flex-shrink: 0;
}

.cmplz-banner-checkbox label {
    position: absolute;
    inset: 0;
    background: #ccc;
    border-radius: 26px;
    cursor: pointer;
    transition: background .2s;
    overflow: hidden;
}

.cmplz-banner-checkbox input {
    opacity: 0;
    width: 0;
    height: 0;
    position: absolute;
    pointer-events: none;
}

.cmplz-banner-checkbox label::before {
    content: '';
    position: absolute;
    width: 18px;
    /* reduced from 20px */
    height: 18px;
    /* reduced from 20px */
    left: 4px;
    top: 4px;
    background: #fff;
    border-radius: 50%;
    transition: transform .2s;
    box-shadow: 0 1px 3px rgba(0, 0, 0, .3);
    /* adds depth */
}

.cmplz-banner-checkbox input:checked+label {
    background: #1976d2;
}

.cmplz-banner-checkbox input:checked+label::before {
    transform: translateX(22px);
}

.sr-only {
    position: absolute;
    width: 1px;
    height: 1px;
    padding: 0;
    margin: -1px;
    overflow: hidden;
    clip: rect(0,0,0,0);
    border: 0;
}

/* Links row */
.cmplz-links {
    display: flex;
    flex-wrap: wrap;
    gap: 12px;
    padding: 4px 16px;
}

.cmplz-link {
    font-size: 11px;
    color: #1976d2;
    text-decoration: none;
}

.cmplz-link:hover { text-decoration: underline; }

/* Buttons */
.cmplz-buttons {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    padding: 12px 16px;
}

.cmplz-btn {
    flex: 1;
    min-width: 80px;
    padding: 8px 12px;
    border-radius: 5px;
    font-size: 13px;
    font-weight: 500;
    cursor: pointer;
    border: 1px solid #ccc;
    background: #f5f5f5;
    color: #333;
    transition: background .15s, border-color .15s;
}

.cmplz-btn:hover { background: #e8e8e8; border-color: #bbb; }

.cmplz-btn.cmplz-accept {
    background: #1976d2;
    color: #fff;
    border-color: #1976d2;
}

.cmplz-btn.cmplz-accept:hover { background: #1565c0; border-color: #1565c0; }

/* Reopen button */
.cmplz-reopen-btn {
    font-size: 11px;
    padding: 6px 14px;
    border-radius: 5px;
    border: 1px solid #ccc;
    background: #fff;
    color: #555;
    cursor: pointer;
    box-shadow: 0 2px 6px rgba(0,0,0,.1);
}

.cmplz-reopen-btn:hover { background: #f5f5f5; }

/* Mobile */
@media (max-width: 480px) {
    #cmplz-cookiebanner-container {
        bottom: 0;
        left: 0;
        right: 0;
        max-width: 100%;
        width: 100%;
    }

    .cmplz-cookiebanner {
        border-radius: 8px 8px 0 0;
        border-bottom: none;
    }
}
