/* FMM Auth System — Form Styles
   Brand: ink #1a1a1a | red #c61818 | light bg #f4f6f9
*/

/* ── Wrapper ── */
.fmm-auth-wrap {
    max-width: 480px;
    margin: 0 auto;
    padding: 40px 24px;
    font-family: inherit;
}
.fmm-auth-wrap h2 {
    font-size: 1.6rem;
    color: #1a1a1a;
    margin: 0 0 24px;
    font-weight: 700;
}
.fmm-auth-wrap.fmm-account {
    max-width: 640px;
}

/* ── Messages ── */
.fmm-auth-message {
    padding: 14px 18px;
    border-radius: 8px;
    margin-bottom: 20px;
    font-size: 0.9rem;
    line-height: 1.5;
}
.fmm-auth-message ul {
    margin: 0;
    padding-left: 18px;
}
.fmm-auth-success {
    background: #eaf7ee;
    color: #1a5c30;
    border-left: 4px solid #34a853;
}
.fmm-auth-error {
    background: #fdecea;
    color: #8b1a1a;
    border-left: 4px solid #e53935;
}
.fmm-auth-notice {
    background: #fff8e6;
    color: #7a5c00;
    border-left: 4px solid #c61818;
    padding: 10px 14px;
    border-radius: 6px;
    font-size: 0.875rem;
    margin-bottom: 16px;
}

/* ── Form layout ── */
.fmm-auth-form {
    display: flex;
    flex-direction: column;
    gap: 18px;
}
.fmm-auth-row {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 16px;
}
@media (max-width: 480px) {
    .fmm-auth-row { grid-template-columns: 1fr; }
}

/* ── Fields ── */
.fmm-auth-field {
    display: flex;
    flex-direction: column;
    gap: 6px;
}
.fmm-auth-field label {
    font-size: 0.85rem;
    font-weight: 600;
    color: #1a1a1a;
    letter-spacing: 0.02em;
}
.fmm-auth-field input[type="text"],
.fmm-auth-field input[type="email"],
.fmm-auth-field input[type="password"] {
    padding: 11px 14px;
    border: 1.5px solid #d0d7e3;
    border-radius: 7px;
    font-size: 0.95rem;
    color: #1a1a1a;
    background: #fff;
    transition: border-color 0.2s;
    width: 100%;
    box-sizing: border-box;
}
.fmm-auth-field input:focus {
    outline: none;
    border-color: #c61818;
    box-shadow: 0 0 0 3px rgba(198,24,24,.15);
}
.fmm-auth-field input:disabled {
    background: #f4f6f9;
    color: #888;
}
.fmm-auth-field small {
    font-size: 0.78rem;
    color: #888;
    line-height: 1.4;
}
.fmm-auth-check label {
    display: flex;
    align-items: center;
    gap: 8px;
    font-weight: 400;
    cursor: pointer;
}

/* ── Button ── */
.fmm-auth-btn {
    display: inline-block;
    padding: 12px 28px;
    background: #1a1a1a;
    color: #fff;
    border: none;
    border-radius: 7px;
    font-size: 0.95rem;
    font-weight: 700;
    cursor: pointer;
    transition: background 0.2s;
    text-decoration: none;
    text-align: center;
    letter-spacing: 0.02em;
}
.fmm-auth-btn:hover {
    background: #c61818;
    color: #fff;
}
.fmm-auth-btn-sm {
    padding: 8px 16px;
    font-size: 0.85rem;
}
.fmm-auth-btn-ghost {
    background: transparent;
    color: #1a1a1a;
    border: 1.5px solid #d0d7e3;
}
.fmm-auth-btn-ghost:hover {
    background: #fdecea;
    color: #8b1a1a;
    border-color: #e53935;
}

/* ── Footer links ── */
.fmm-auth-footer {
    margin-top: 20px;
    font-size: 0.875rem;
    color: #666;
    text-align: center;
}
.fmm-auth-footer a {
    color: #1a1a1a;
    text-decoration: underline;
}
.fmm-auth-footer a:hover {
    color: #c61818;
}

/* ── Account page sections ── */
.fmm-account-avatar {
    display: flex;
    align-items: center;
    gap: 16px;
    margin-bottom: 32px;
}
.fmm-avatar-preview {
    width: 80px;
    height: 80px;
    border-radius: 50%;
    object-fit: cover;
    border: 2px solid #d0d7e3;
}
.fmm-account-section {
    border-top: 1.5px solid #e8ecf2;
    padding-top: 28px;
    margin-top: 28px;
}
.fmm-account-section h3 {
    font-size: 1rem;
    color: #1a1a1a;
    font-weight: 700;
    margin: 0 0 18px;
    text-transform: uppercase;
    letter-spacing: 0.06em;
    font-size: 0.82rem;
}

/* ── RTL support ── */
[dir="rtl"] .fmm-auth-wrap {
    text-align: right;
}
[dir="rtl"] .fmm-auth-success {
    border-left: none;
    border-right: 4px solid #34a853;
}
[dir="rtl"] .fmm-auth-error {
    border-left: none;
    border-right: 4px solid #e53935;
}
[dir="rtl"] .fmm-auth-notice {
    border-left: none;
    border-right: 4px solid #c61818;
}
[dir="rtl"] .fmm-auth-message ul {
    padding-left: 0;
    padding-right: 18px;
}
[dir="rtl"] .fmm-auth-check label {
    flex-direction: row-reverse;
    justify-content: flex-end;
}
[dir="rtl"] .fmm-account-avatar {
    flex-direction: row-reverse;
}

/* ── Social login (Nextend Google) — centered & aligned to the auth card ── */
.nsl-container {
    max-width: 480px;
    margin-left: auto;
    margin-right: auto;
    padding: 0 24px;
    box-sizing: border-box;
}
.nsl-container .nsl-button {
    border-radius: 7px !important;
    box-shadow: none !important;
    justify-content: center !important;
}
.nsl-container-block,
.nsl-container .nsl-button-default {
    width: 100% !important;
}

/* ── Social login divider (custom auth pages) ── */
.fmm-auth-social { margin-top: 20px; }
.fmm-auth-divider {
    max-width: 480px;
    margin: 0 auto 14px;
    padding: 0 24px;
    display: flex;
    align-items: center;
    color: #6b7280;
    font-size: 0.8rem;
    box-sizing: border-box;
}
.fmm-auth-divider::before,
.fmm-auth-divider::after { content: ""; flex: 1; height: 1px; background: #e8ecf2; }
.fmm-auth-divider span { padding: 0 12px; white-space: nowrap; }
