/* ═══════════════════════════════════════════════════════
   MEGAFAX Register Widget — CSS v1.0.0
   Mismo design system que el sitio principal
   ═══════════════════════════════════════════════════════ */

/* ── Wrapper ─────────────────────────────────────────── */
.mfx-reg-wrap {
    background: #ffffff;
    border-radius: 20px;
    padding: 44px 48px;
    box-shadow: 0 12px 40px rgba(27, 43, 75, 0.12);
    max-width: 520px;
    margin-left: auto;
    margin-right: auto;
    font-family: 'Nunito Sans', sans-serif;
    position: relative;
}

/* ── Header ──────────────────────────────────────────── */
.mfx-reg-header {
    margin-bottom: 32px;
}

.mfx-reg-title {
    font-family: 'Nunito', sans-serif;
    font-size: 26px;
    font-weight: 900;
    color: #1B2B4B;
    line-height: 1.2;
    margin: 0 0 8px;
}

.mfx-reg-subtitle {
    font-size: 14px;
    color: #6B7A99;
    line-height: 1.6;
    margin: 0;
}

/* ── Logged-in / disabled messages ──────────────────── */
.mfx-reg-logged-in,
.mfx-reg-disabled {
    font-size: 14px;
    color: #6B7A99;
    text-align: center;
    padding: 12px 0;
    margin: 0;
}

.mfx-reg-logged-in strong { color: #1B2B4B; }
.mfx-reg-logged-in a,
.mfx-reg-disabled a { color: #1B2B4B; font-weight: 700; }

/* ── Feedback message ────────────────────────────────── */
.mfx-reg-msg {
    border-radius: 10px;
    padding: 13px 16px;
    font-size: 13px;
    font-weight: 600;
    line-height: 1.5;
    margin-bottom: 20px;
    display: flex;
    align-items: flex-start;
    gap: 8px;
}

.mfx-reg-msg.success {
    background: #ECFDF5;
    color: #065F46;
    border: 1px solid #A7F3D0;
}

.mfx-reg-msg.error {
    background: #FEF2F2;
    color: #991B1B;
    border: 1px solid #FECACA;
}

.mfx-reg-msg.success::before { content: '✓'; font-size: 15px; font-weight: 900; flex-shrink: 0; }
.mfx-reg-msg.error::before   { content: '✕'; font-size: 15px; font-weight: 900; flex-shrink: 0; }

/* ── Form layout ─────────────────────────────────────── */
.mfx-reg-form {
    display: flex;
    flex-direction: column;
    gap: 0;
}

.mfx-reg-form.mfx-double {
    display: grid;
    grid-template-columns: 1fr 1fr;
    column-gap: 16px;
}

.mfx-reg-form.mfx-double .mfx-reg-field-group:not(.mfx-col-half) {
    grid-column: 1 / -1;
}

/* ── Field group ─────────────────────────────────────── */
.mfx-reg-field-group {
    display: flex;
    flex-direction: column;
    margin-bottom: 18px;
}

/* ── Label ───────────────────────────────────────────── */
.mfx-reg-label {
    display: block;
    font-size: 13px;
    font-weight: 700;
    color: #1B2B4B;
    margin-bottom: 6px;
    line-height: 1.4;
}

.mfx-req {
    color: #E31E24;
}

/* ── Input ───────────────────────────────────────────── */
.mfx-reg-input {
    width: 100%;
    background-color: #F4F6F9;
    color: #1B2B4B;
    font-family: 'Nunito Sans', sans-serif;
    font-size: 14px;
    font-weight: 400;
    line-height: 1.5;
    padding: 13px 16px;
    border: 1px solid #DDE4EF;
    border-radius: 10px;
    outline: none;
    transition: border-color 0.22s, background-color 0.22s, box-shadow 0.22s;
    appearance: none;
    -webkit-appearance: none;
}

.mfx-reg-input::placeholder {
    color: #9099A8;
}

.mfx-reg-input:focus {
    background-color: #ffffff;
    border-color: #1B2B4B;
    box-shadow: 0 0 0 3px rgba(27, 43, 75, 0.08);
}

.mfx-reg-input.mfx-input-error {
    border-color: #E31E24;
    background-color: #FFF8F8;
}

.mfx-reg-input.mfx-input-error:focus {
    box-shadow: 0 0 0 3px rgba(227, 30, 36, 0.10);
}

.mfx-reg-input.mfx-input-ok {
    border-color: #10B981;
}

/* ── Password wrap (input + toggle btn) ──────────────── */
.mfx-pass-wrap {
    position: relative;
    display: flex;
    align-items: center;
}

.mfx-pass-wrap .mfx-reg-input {
    padding-right: 48px;
}

.mfx-pass-toggle {
    position: absolute;
    right: 14px;
    top: 50%;
    transform: translateY(-50%);
    background: none;
    border: none;
    cursor: pointer;
    color: #9099A8;
    padding: 0;
    display: flex;
    align-items: center;
    transition: color 0.2s;
    line-height: 0;
}

.mfx-pass-toggle:hover { color: #1B2B4B; }

.mfx-pass-toggle svg {
    width: 18px;
    height: 18px;
}

/* ── Password strength ───────────────────────────────── */
.mfx-strength-wrap {
    margin-top: 7px;
    display: flex;
    align-items: center;
    gap: 10px;
}

.mfx-strength-bar {
    flex: 1;
    height: 4px;
    background: #DDE4EF;
    border-radius: 2px;
    overflow: hidden;
}

.mfx-strength-fill {
    display: block;
    height: 100%;
    width: 0;
    border-radius: 2px;
    transition: width 0.4s ease, background-color 0.4s ease;
}

.mfx-strength-label {
    font-size: 11px;
    font-weight: 700;
    white-space: nowrap;
    min-width: 60px;
    text-align: right;
}

/* Strength levels */
.mfx-strength-wrap[data-strength="weak"]   .mfx-strength-fill { width: 25%; background: #EF4444; }
.mfx-strength-wrap[data-strength="fair"]   .mfx-strength-fill { width: 50%; background: #F59E0B; }
.mfx-strength-wrap[data-strength="good"]   .mfx-strength-fill { width: 75%; background: #3B82F6; }
.mfx-strength-wrap[data-strength="strong"] .mfx-strength-fill { width: 100%; background: #10B981; }

.mfx-strength-wrap[data-strength="weak"]   .mfx-strength-label { color: #EF4444; }
.mfx-strength-wrap[data-strength="fair"]   .mfx-strength-label { color: #F59E0B; }
.mfx-strength-wrap[data-strength="good"]   .mfx-strength-label { color: #3B82F6; }
.mfx-strength-wrap[data-strength="strong"] .mfx-strength-label { color: #10B981; }

/* ── Field error message ─────────────────────────────── */
.mfx-field-error {
    display: none;
    font-size: 11.5px;
    font-weight: 600;
    color: #E31E24;
    margin-top: 5px;
    line-height: 1.4;
}

.mfx-field-error:not(:empty) { display: block; }

/* ── Terms checkbox ──────────────────────────────────── */
.mfx-terms-group .mfx-reg-terms-label {
    display: flex;
    align-items: flex-start;
    gap: 10px;
    cursor: pointer;
    font-size: 13px;
    color: #6B7A99;
    line-height: 1.5;
    font-weight: 400;
}

.mfx-reg-checkbox {
    position: absolute;
    opacity: 0;
    width: 0;
    height: 0;
    pointer-events: none;
}

.mfx-checkmark {
    width: 18px;
    height: 18px;
    border: 2px solid #DDE4EF;
    border-radius: 5px;
    flex-shrink: 0;
    margin-top: 1px;
    background: #F4F6F9;
    transition: all 0.2s;
    position: relative;
    display: flex;
    align-items: center;
    justify-content: center;
}

.mfx-reg-checkbox:checked + .mfx-checkmark {
    background: #1B2B4B;
    border-color: #1B2B4B;
}

.mfx-reg-checkbox:checked + .mfx-checkmark::after {
    content: '';
    width: 5px;
    height: 9px;
    border: 2px solid #fff;
    border-top: none;
    border-left: none;
    transform: rotate(45deg) translateY(-1px);
    display: block;
}

.mfx-reg-terms-label a {
    color: #1B2B4B;
    font-weight: 700;
    text-decoration: underline;
    text-decoration-color: rgba(27, 43, 75, 0.3);
    transition: text-decoration-color 0.2s;
}

.mfx-reg-terms-label a:hover {
    text-decoration-color: #1B2B4B;
}

/* ── Submit button ───────────────────────────────────── */
.mfx-submit-group { margin-top: 4px; }

.mfx-reg-submit {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
    width: 100%;
    background-color: #E31E24;
    color: #ffffff;
    font-family: 'Nunito Sans', sans-serif;
    font-size: 15px;
    font-weight: 800;
    padding: 15px 32px;
    border: none;
    border-radius: 50px;
    cursor: pointer;
    transition: background-color 0.25s, transform 0.25s, box-shadow 0.25s;
    line-height: 1;
    letter-spacing: 0.2px;
}

.mfx-reg-submit:hover:not(:disabled) {
    background-color: #C01820;
    transform: translateY(-2px);
    box-shadow: 0 8px 24px rgba(227, 30, 36, 0.35);
}

.mfx-reg-submit:active:not(:disabled) {
    transform: translateY(0);
}

.mfx-reg-submit:disabled,
.mfx-reg-submit.mfx-sending {
    opacity: 0.75;
    cursor: not-allowed;
    pointer-events: none;
}

.mfx-spin {
    animation: mfx-reg-spin 0.8s linear infinite;
}

.mfx-btn-spinner svg {
    width: 18px;
    height: 18px;
}

@keyframes mfx-reg-spin {
    0%   { transform: rotate(0deg); }
    100% { transform: rotate(360deg); }
}

/* ── Login link ──────────────────────────────────────── */
.mfx-reg-login-link {
    text-align: center;
    margin-top: 18px;
    font-size: 13px;
    color: #6B7A99;
}

.mfx-reg-login-link a {
    color: #1B2B4B;
    font-weight: 700;
    text-decoration: none;
    transition: color 0.2s, text-decoration-color 0.2s;
    text-decoration: underline;
    text-decoration-color: rgba(27, 43, 75, 0.3);
}

.mfx-reg-login-link a:hover {
    color: #E31E24;
    text-decoration-color: rgba(227, 30, 36, 0.4);
}

/* ── Responsive ──────────────────────────────────────── */
@media (max-width: 600px) {
    .mfx-reg-wrap {
        padding: 32px 22px;
        border-radius: 14px;
    }

    .mfx-reg-form.mfx-double {
        grid-template-columns: 1fr;
    }

    .mfx-reg-form.mfx-double .mfx-reg-field-group {
        grid-column: auto;
    }

    .mfx-reg-title {
        font-size: 22px;
    }
}
