.ml-optin-overlay {
    position: fixed;
    inset: 0;
    z-index: 160000;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 20px;
    background: rgba(0, 0, 0, .55);
    animation: ml-optin-fade .2s ease-out both;
}

.ml-optin-overlay[hidden] {
    display: none;
}

.ml-optin-dialog {
    width: 100%;
    max-width: 480px;
    overflow: hidden;
    border-radius: 6px;
    background: #fff;
    box-shadow: 0 12px 40px rgba(0, 0, 0, .3);
    animation: ml-optin-rise .25s cubic-bezier(.16, 1, .3, 1) both;
}

.ml-optin-title {
    margin: 0;
    padding: 14px 20px;
    background: #dd6923;
    color: #fff;
    font-size: 16px;
    line-height: 1.4;
    font-weight: 600;
    text-align: center;
}

.ml-optin-body {
    padding: 20px;
    text-align: center;
}

.ml-optin-lead {
    margin: 0 0 16px;
    font-size: 14px;
    line-height: 1.6;
    color: #1d2327;
}

.ml-optin-field {
    margin-bottom: 12px;
}

.ml-optin-email {
    width: 100%;
    padding: 8px 12px;
    font-size: 14px;
}

.ml-optin-fineprint {
    margin: 0;
    font-size: 12px;
    line-height: 1.6;
    color: #646970;
}

.ml-optin-report {
    margin-top: 16px;
    text-align: left;
    font-size: 12px;
}

.ml-optin-report[hidden] {
    display: none;
}

.ml-optin-report > summary {
    cursor: pointer;
    color: #646970;
    user-select: none;
}

.ml-optin-report-status {
    font-weight: 600;
}

.ml-optin-report.is-ok .ml-optin-report-status {
    color: #007017;
}

.ml-optin-report.is-bad .ml-optin-report-status {
    color: #b32d2e;
}

.ml-optin-report-body {
    max-height: 220px;
    margin: 8px 0 0;
    padding: 10px;
    overflow: auto;
    background: #f6f7f7;
    font-size: 11px;
    line-height: 1.5;
    white-space: pre-wrap;
    word-break: break-all;
}

.ml-optin-actions {
    display: flex;
    gap: 10px;
    justify-content: flex-end;
    padding: 0 20px 20px;
}

.ml-optin-actions .button[hidden] {
    display: none;
}

.ml-optin-dialog[data-state="sending"] .ml-optin-email,
.ml-optin-dialog[data-state="sending"] .button {
    pointer-events: none;
    opacity: .6;
}

.ml-optin-dialog[data-state="sent"] .ml-optin-field,
.ml-optin-dialog[data-state="sent"] .ml-optin-privacy {
    display: none;
}

@keyframes ml-optin-fade {
    from { opacity: 0; }
    to { opacity: 1; }
}

@keyframes ml-optin-rise {
    from { opacity: 0; transform: translateY(12px); }
    to { opacity: 1; transform: none; }
}

@media (prefers-reduced-motion: reduce) {
    .ml-optin-overlay,
    .ml-optin-dialog {
        animation: none;
    }
}
