/**
 * Unified alerts for registration steps (register, verify-email, how-did-you-hear, complete-profile, license-ready).
 * Aligns with portal notification styling (YOOAdmin grays + #EEB44E accent).
 *
 * @package YOOPixel_Management
 */

/* ── Base (also used by #yoopxl-*-message containers) ─────────────────── */
.yoopxl-flow-alert {
    width: 100%;
    max-width: 100%;
    box-sizing: border-box;
    border-radius: 10px;
    border: 1px solid rgba(59, 130, 246, 0.22);
    box-shadow: 0 1px 3px rgba(15, 23, 42, 0.08);
    overflow: hidden;
    background: #fff;
    margin: 0 0 16px;
}

.yoopxl-flow-alert--block {
    margin-bottom: 20px;
}

.yoopxl-flow-alert__inner {
    display: flex;
    align-items: flex-start;
    gap: 14px;
    padding: 16px 18px;
    background: linear-gradient(135deg, #eff6ff 0%, #dbeafe 100%);
}

.yoopxl-flow-alert__icon {
    flex-shrink: 0;
    width: 38px;
    height: 38px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    background: rgba(255, 255, 255, 0.95);
    border: 1px solid rgba(59, 130, 246, 0.18);
    box-shadow: 0 1px 2px rgba(0, 0, 0, 0.06);
    font-size: 20px;
    line-height: 1;
    color: #3b82f6;
}

.yoopxl-flow-alert__body {
    flex: 1;
    min-width: 0;
    font-size: 14px;
    line-height: 1.55;
    color: #1e3a8a;
}

.yoopxl-flow-alert__body p {
    margin: 0 0 8px;
}

.yoopxl-flow-alert__body p:last-child {
    margin-bottom: 0;
}

/* Legacy: JS message boxes keep .yoopxl-message + modifier on same node */
.yoopxl-message.yoopxl-flow-alert {
    margin-bottom: 20px;
}

/* ── Variants ───────────────────────────────────────────────────────── */
.yoopxl-flow-alert--success,
.yoopxl-message.yoopxl-flow-alert.success,
.yoopxl-message.yoopxl-flow-alert.yoopxl-flow-alert--success {
    border-color: rgba(34, 197, 94, 0.28);
}

.yoopxl-flow-alert--success .yoopxl-flow-alert__inner,
.yoopxl-message.yoopxl-flow-alert.success .yoopxl-flow-alert__inner,
.yoopxl-message.yoopxl-flow-alert.yoopxl-flow-alert--success .yoopxl-flow-alert__inner {
    background: linear-gradient(135deg, #f0fdf4 0%, #dcfce7 100%);
}

.yoopxl-flow-alert--success .yoopxl-flow-alert__icon,
.yoopxl-message.yoopxl-flow-alert.success .yoopxl-flow-alert__icon {
    border-color: rgba(34, 197, 94, 0.22);
    color: #16a34a;
}

.yoopxl-flow-alert--success .yoopxl-flow-alert__body,
.yoopxl-message.yoopxl-flow-alert.success .yoopxl-flow-alert__body {
    color: #14532d;
}

.yoopxl-flow-alert--info,
.yoopxl-message.yoopxl-flow-alert.info,
.yoopxl-message.yoopxl-flow-alert.yoopxl-flow-alert--info {
    border-color: rgba(59, 130, 246, 0.22);
}

.yoopxl-flow-alert--info .yoopxl-flow-alert__body,
.yoopxl-message.yoopxl-flow-alert.info .yoopxl-flow-alert__body {
    color: #1e3a8a;
}

.yoopxl-flow-alert--warning,
.yoopxl-message.yoopxl-flow-alert.warning,
.yoopxl-message.yoopxl-flow-alert.yoopxl-flow-alert--warning {
    border-color: rgba(245, 158, 11, 0.35);
}

.yoopxl-flow-alert--warning .yoopxl-flow-alert__inner,
.yoopxl-message.yoopxl-flow-alert.warning .yoopxl-flow-alert__inner {
    background: linear-gradient(135deg, #fffbeb 0%, #fef3c7 100%);
}

.yoopxl-flow-alert--warning .yoopxl-flow-alert__icon,
.yoopxl-message.yoopxl-flow-alert.warning .yoopxl-flow-alert__icon {
    border-color: rgba(245, 158, 11, 0.25);
    color: #d97706;
}

.yoopxl-flow-alert--warning .yoopxl-flow-alert__body,
.yoopxl-message.yoopxl-flow-alert.warning .yoopxl-flow-alert__body {
    color: #78350f;
}

.yoopxl-flow-alert--error,
.yoopxl-message.yoopxl-flow-alert.error,
.yoopxl-message.yoopxl-flow-alert.yoopxl-flow-alert--error {
    border-color: rgba(220, 38, 38, 0.28);
}

.yoopxl-flow-alert--error .yoopxl-flow-alert__inner,
.yoopxl-message.yoopxl-flow-alert.error .yoopxl-flow-alert__inner {
    background: linear-gradient(135deg, #fef2f2 0%, #fee2e2 100%);
}

.yoopxl-flow-alert--error .yoopxl-flow-alert__icon,
.yoopxl-message.yoopxl-flow-alert.error .yoopxl-flow-alert__icon {
    border-color: rgba(220, 38, 38, 0.22);
    color: #dc2626;
}

.yoopxl-flow-alert--error .yoopxl-flow-alert__body,
.yoopxl-message.yoopxl-flow-alert.error .yoopxl-flow-alert__body {
    color: #7f1d1d;
}

/* Compact (inline field errors) */
.yoopxl-flow-alert--compact .yoopxl-flow-alert__inner {
    padding: 10px 12px;
    gap: 10px;
}

.yoopxl-flow-alert--compact .yoopxl-flow-alert__icon {
    width: 28px;
    height: 28px;
    font-size: 16px;
}

.yoopxl-flow-alert--compact .yoopxl-flow-alert__body {
    font-size: 13px;
}

@keyframes yoopxlFlowAlertIn {
    from {
        opacity: 0;
        transform: translate3d(0, -8px, 0);
    }
    to {
        opacity: 1;
        transform: translate3d(0, 0, 0);
    }
}

.yoopxl-flow-alert.yoopxl-flow-alert--animate {
    animation: yoopxlFlowAlertIn 0.35s ease-out;
}

/* In-flow message slots (override old fixed-position toast rules from themes) */
#yoopxl-registration-message,
#verify-message,
#referral-message,
#yoopxl-profile-message {
    position: relative !important;
    top: auto !important;
    left: auto !important;
    right: auto !important;
    transform: none !important;
    z-index: auto !important;
    max-width: 100% !important;
    width: 100%;
}


