:root {
    --mfcb-primary: #2563eb;
    --mfcb-primary-hover: #1d4ed8;
    --mfcb-bg: #ffffff;
    --mfcb-text: #1e293b;
    --mfcb-text-secondary: #64748b;
    --mfcb-border: #e2e8f0;
    --mfcb-shadow: 0 10px 40px rgba(0, 0, 0, 0.15);
    --mfcb-radius: 12px;
    --mfcb-font: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Oxygen, Ubuntu, Cantarell, sans-serif;
}

#mfcb-overlay {
    position: fixed;
    inset: 0;
    z-index: 999999;
    display: flex;
    align-items: flex-end;
    justify-content: center;
    background: rgba(0, 0, 0, 0.3);
    font-family: var(--mfcb-font);
    line-height: 1.5;
    box-sizing: border-box;
}

#mfcb-overlay *,
#mfcb-overlay *::before,
#mfcb-overlay *::after {
    box-sizing: border-box;
}

#mfcb-banner {
    width: 100%;
    max-width: 640px;
    margin: 20px;
    background: var(--mfcb-bg);
    border-radius: var(--mfcb-radius);
    box-shadow: var(--mfcb-shadow);
    padding: 28px 32px 24px;
    color: var(--mfcb-text);
    animation: mfcb-slideUp 0.35s ease-out;
}

@keyframes mfcb-slideUp {
    from {
        opacity: 0;
        transform: translateY(24px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

@keyframes mfcb-fadeIn {
    from { opacity: 0; }
    to { opacity: 1; }
}

.mfcb-header {
    display: flex;
    align-items: center;
    gap: 10px;
    margin-bottom: 12px;
}

.mfcb-icon {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 40px;
    height: 40px;
    border-radius: 10px;
    background: #eff6ff;
    color: var(--mfcb-primary);
    flex-shrink: 0;
}

.mfcb-title {
    font-size: 18px;
    font-weight: 600;
    margin: 0;
    color: var(--mfcb-text);
}

.mfcb-description {
    font-size: 14px;
    color: var(--mfcb-text-secondary);
    margin: 0 0 16px;
    line-height: 1.6;
}

.mfcb-details {
    margin-bottom: 16px;
}

.mfcb-toggle-row {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 12px 0;
    border-bottom: 1px solid var(--mfcb-border);
    gap: 16px;
}

.mfcb-toggle-row:last-child {
    border-bottom: none;
}

.mfcb-toggle-info {
    display: flex;
    flex-direction: column;
    gap: 2px;
    min-width: 0;
}

.mfcb-toggle-label {
    font-size: 14px;
    font-weight: 500;
    color: var(--mfcb-text);
}

.mfcb-toggle-desc {
    font-size: 12px;
    color: var(--mfcb-text-secondary);
    line-height: 1.4;
}

.mfcb-badge {
    font-size: 11px;
    font-weight: 500;
    text-transform: uppercase;
    letter-spacing: 0.04em;
    color: var(--mfcb-text-secondary);
    background: #f1f5f9;
    padding: 4px 10px;
    border-radius: 20px;
    flex-shrink: 0;
}

.mfcb-switch {
    position: relative;
    display: inline-block;
    width: 44px;
    height: 24px;
    flex-shrink: 0;
    cursor: pointer;
}

.mfcb-switch input {
    opacity: 0;
    width: 0;
    height: 0;
    position: absolute;
}

.mfcb-slider {
    position: absolute;
    cursor: pointer;
    inset: 0;
    background: #cbd5e1;
    border-radius: 24px;
    transition: background 0.2s;
}

.mfcb-slider::before {
    content: '';
    position: absolute;
    height: 18px;
    width: 18px;
    left: 3px;
    bottom: 3px;
    background: #ffffff;
    border-radius: 50%;
    transition: transform 0.2s;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.15);
}

.mfcb-switch input:checked + .mfcb-slider {
    background: var(--mfcb-primary);
}

.mfcb-switch input:checked + .mfcb-slider::before {
    transform: translateX(20px);
}

.mfcb-switch input:focus-visible + .mfcb-slider {
    outline: 2px solid var(--mfcb-primary);
    outline-offset: 2px;
}

.mfcb-actions {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    margin-top: 16px;
}

.mfcb-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 10px 20px;
    font-size: 14px;
    font-weight: 500;
    font-family: inherit;
    border: 1px solid transparent;
    border-radius: 8px;
    cursor: pointer;
    transition: background 0.15s, box-shadow 0.15s;
    line-height: 1.2;
    white-space: nowrap;
}

.mfcb-btn:focus-visible {
    outline: 2px solid var(--mfcb-primary);
    outline-offset: 2px;
}

.mfcb-btn-primary {
    background: var(--mfcb-primary);
    color: #ffffff;
    border-color: var(--mfcb-primary);
}

.mfcb-btn-primary:hover {
    background: var(--mfcb-primary-hover);
    border-color: var(--mfcb-primary-hover);
}

.mfcb-btn-secondary {
    background: #f1f5f9;
    color: var(--mfcb-text);
    border-color: var(--mfcb-border);
}

.mfcb-btn-secondary:hover {
    background: #e2e8f0;
}

.mfcb-btn-outline {
    background: transparent;
    color: var(--mfcb-text);
    border-color: var(--mfcb-border);
}

.mfcb-btn-outline:hover {
    background: #f8fafc;
    border-color: #cbd5e1;
}

#mfcb-modal {
    width: 100%;
    max-width: 520px;
    margin: 20px;
    background: var(--mfcb-bg);
    border-radius: var(--mfcb-radius);
    box-shadow: var(--mfcb-shadow);
    padding: 28px 32px 24px;
    color: var(--mfcb-text);
    animation: mfcb-slideUp 0.3s ease-out;
    position: relative;
    max-height: 90vh;
    overflow-y: auto;
    align-self: center;
}

#mfcb-modal .mfcb-header {
    margin-bottom: 8px;
}

.mfcb-close {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 32px;
    height: 32px;
    margin-left: auto;
    background: transparent;
    border: none;
    border-radius: 8px;
    cursor: pointer;
    color: var(--mfcb-text-secondary);
    flex-shrink: 0;
    transition: background 0.15s;
}

.mfcb-close:hover {
    background: #f1f5f9;
    color: var(--mfcb-text);
}

#mfcb-floating-btn {
    position: fixed;
    bottom: 24px;
    left: 24px;
    z-index: 99999;
    width: 48px;
    height: 48px;
    border-radius: 50%;
    background: var(--mfcb-bg);
    color: var(--mfcb-primary);
    border: 1px solid var(--mfcb-border);
    box-shadow: 0 2px 12px rgba(0, 0, 0, 0.12);
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: transform 0.2s, box-shadow 0.2s;
    animation: mfcb-fadeIn 0.3s ease-out;
}

#mfcb-floating-btn:hover {
    transform: scale(1.08);
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.18);
}

#mfcb-floating-btn:focus-visible {
    outline: 2px solid var(--mfcb-primary);
    outline-offset: 2px;
}

@media (max-width: 600px) {
    #mfcb-banner {
        margin: 12px;
        padding: 20px 20px 16px;
        border-radius: 10px;
    }

    #mfcb-modal {
        margin: 12px;
        padding: 20px 20px 16px;
        border-radius: 10px;
    }

    .mfcb-actions {
        flex-direction: column;
    }

    .mfcb-btn {
        width: 100%;
    }

    #mfcb-floating-btn {
        bottom: 16px;
        left: 16px;
        width: 44px;
        height: 44px;
    }
}
