/* ============================================
   Doc Miners — Privacy & Cookie Consent Styles
   F14: Cookie banner, preference modal, consent checkboxes
   ============================================ */

/* Cookie banner — fixed at bottom */
.mb-cookie-banner {
    position: fixed;
    bottom: 0;
    left: 0;
    right: 0;
    background: #1e293b;
    color: #f1f5f9;
    padding: 16px 24px;
    z-index: 10000;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 16px;
    font-size: 14px;
    line-height: 1.5;
    box-shadow: 0 -2px 10px rgba(0, 0, 0, 0.15);
}

.mb-cookie-banner[hidden] {
    display: none;
}

.mb-cookie-banner-text {
    flex: 1;
    max-width: 700px;
}

.mb-cookie-banner-text a {
    color: #93c5fd;
    text-decoration: underline;
}

.mb-cookie-banner-actions {
    display: flex;
    gap: 8px;
    flex-shrink: 0;
}

.mb-cookie-btn {
    padding: 8px 16px;
    border-radius: 6px;
    font-size: 13px;
    font-weight: 600;
    cursor: pointer;
    border: none;
    transition: background 0.15s, opacity 0.15s;
}

.mb-cookie-btn:hover {
    opacity: 0.9;
}

.mb-cookie-btn-accept {
    background: #2563eb;
    color: #fff;
}

.mb-cookie-btn-manage {
    background: transparent;
    color: #93c5fd;
    border: 1px solid #475569;
}

/* Cookie preference modal */
.mb-cookie-modal-overlay {
    position: fixed;
    inset: 0;
    background: rgba(0, 0, 0, 0.5);
    z-index: 10001;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 16px;
}

.mb-cookie-modal-overlay[hidden] {
    display: none;
}

.mb-cookie-modal {
    background: #fff;
    border-radius: 12px;
    max-width: 480px;
    width: 100%;
    padding: 24px;
    color: #1e293b;
    max-height: 80vh;
    overflow-y: auto;
}

.mb-cookie-modal h3 {
    font-size: 18px;
    font-weight: 700;
    margin: 0 0 16px 0;
}

.mb-cookie-category {
    border: 1px solid #e2e8f0;
    border-radius: 8px;
    padding: 12px 16px;
    margin-bottom: 12px;
}

.mb-cookie-category-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
}

.mb-cookie-category-name {
    font-weight: 600;
    font-size: 14px;
}

.mb-cookie-category-desc {
    font-size: 13px;
    color: #64748b;
    margin-top: 4px;
}

.mb-cookie-toggle {
    position: relative;
    width: 40px;
    height: 22px;
    flex-shrink: 0;
}

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

.mb-cookie-toggle-slider {
    position: absolute;
    inset: 0;
    background: #cbd5e1;
    border-radius: 11px;
    cursor: pointer;
    transition: background 0.2s;
}

.mb-cookie-toggle-slider::before {
    content: '';
    position: absolute;
    width: 18px;
    height: 18px;
    left: 2px;
    top: 2px;
    background: #fff;
    border-radius: 50%;
    transition: transform 0.2s;
}

.mb-cookie-toggle input:checked + .mb-cookie-toggle-slider {
    background: #2563eb;
}

.mb-cookie-toggle input:checked + .mb-cookie-toggle-slider::before {
    transform: translateX(18px);
}

.mb-cookie-toggle input:disabled + .mb-cookie-toggle-slider {
    opacity: 0.5;
    cursor: not-allowed;
}

.mb-cookie-modal-actions {
    display: flex;
    gap: 8px;
    margin-top: 16px;
    justify-content: flex-end;
}

/* Consent checkboxes (registration form) */
.mybutler-consent-checkbox {
    margin-bottom: 12px;
}

.mybutler-consent-checkbox label {
    display: flex;
    align-items: flex-start;
    gap: 8px;
    font-size: 13px;
    color: #475569;
    line-height: 1.4;
    cursor: pointer;
}

.mybutler-consent-checkbox input[type="checkbox"] {
    margin-top: 2px;
    flex-shrink: 0;
    width: 16px;
    height: 16px;
}

.mybutler-consent-checkbox a {
    color: #2563eb;
    text-decoration: underline;
}

.mybutler-consent-checkbox .required {
    color: #ef4444;
    font-weight: 700;
}

/* Responsive */
@media (max-width: 640px) {
    .mb-cookie-banner {
        flex-direction: column;
        text-align: center;
        padding: 12px 16px;
    }

    .mb-cookie-banner-actions {
        width: 100%;
        justify-content: center;
    }

    .mb-cookie-modal {
        max-width: 100%;
    }
}
