/* ==========================================================================
   My Profile (app_my_profile.php) - feature-specific styling.
   Relies on the shared vocabulary in assets/general/general.css.
   ========================================================================== */

.mp-page { padding-bottom: 48px; }
.mp-page-narrow { max-width: 760px; }

/* Forgot-password "when is my email registered" help block */
.mp-remind-help { margin-top: 20px; }
.mp-remind-help .section-body { padding: 18px 22px 20px; }
.mp-remind-help .section-body p {
    margin: 0 0 14px;
    color: #4a4f5a;
    line-height: 1.6;
}
.mp-remind-help .section-body ul {
    list-style: none;
    margin: 0;
    padding: 0;
    display: flex;
    flex-direction: column;
    gap: 10px;
}
.mp-remind-help .section-body li {
    position: relative;
    padding-left: 26px;
    color: #1a1a2e;
    line-height: 1.5;
}
.mp-remind-help .section-body li::before {
    content: "";
    position: absolute;
    left: 7px;
    top: 8px;
    width: 6px;
    height: 6px;
    border-radius: 50%;
    background: #0f3460;
}

/* ---- Cards ---- */
.card {
    background: #fff;
    border: 1px solid #d5d5d5;
    border-radius: 8px;
    padding: 20px 24px;
}
.mp-card { margin-bottom: 20px; }

/* Indent bullet lists inside info blocks (global reset zeroes ul padding,
   which otherwise puts markers flush against the block border). */
.mp-card .section-info-block ul {
    margin: 8px 0 2px;
    padding-left: 22px;
}
.mp-card .section-info-block li {
    margin-bottom: 6px;
    line-height: 1.6;
}
.mp-card .section-info-block li:last-child { margin-bottom: 0; }
.mp-card-title {
    font-size: 16px;
    font-weight: 700;
    color: #1a1a2e;
    margin: 0 0 16px;
    padding-bottom: 10px;
    border-bottom: 1px solid #eee;
}

/* ---- Profile two-column layout ---- */
.mp-grid {
    display: grid;
    grid-template-columns: minmax(0, 2fr) minmax(0, 1fr);
    gap: 20px;
    align-items: start;
}
@media (max-width: 800px) {
    .mp-grid { grid-template-columns: 1fr; }
}

/* ---- Authenticator wizard steps ---- */
.mp-step {
    padding: 18px 0;
    border-bottom: 1px solid #eef0f3;
}
.mp-step:last-child { border-bottom: none; }
.mp-step-head {
    display: flex;
    align-items: center;
    gap: 10px;
    font-size: 14px;
    font-weight: 700;
    color: #0f3460;
    margin-bottom: 10px;
}
.mp-step-num {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 24px;
    height: 24px;
    border-radius: 50%;
    background: #0f3460;
    color: #fff;
    font-size: 13px;
    font-weight: 700;
    flex-shrink: 0;
}
.mp-step-body { font-size: 13px; color: #333; line-height: 1.6; }
.mp-step-body p { margin: 0 0 8px; }
.mp-step-body a { color: #0f3460; }
.mp-step--confirm .mp-step-head { color: #1a1a2e; }

/* ---- QR + App Key ---- */
.mp-qr-wrap {
    display: flex;
    align-items: center;
    gap: 24px;
    flex-wrap: wrap;
    margin: 12px 0 14px;
}
.mp-qr {
    width: 200px;
    height: 200px;
    border: 1px solid #e2e5ea;
    border-radius: 6px;
    background: #fff;
    padding: 6px;
}
.mp-appkey { min-width: 0; }
.mp-appkey-label {
    font-size: 11px;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    color: #778;
    margin-bottom: 6px;
}
.mp-appkey-value {
    display: inline-block;
    font-family: "Courier New", monospace;
    font-size: 16px;
    font-weight: 700;
    letter-spacing: 2px;
    color: #1a1a2e;
    background: #f5f7fa;
    border: 1px solid #e2e5ea;
    border-radius: 5px;
    padding: 8px 14px;
    word-break: break-all;
}

/* ---- Secret Q/A important callout + acknowledgement ---- */
.callout-banner-text {
    font-size: 13px;
    line-height: 1.6;
    color: #5a4a1a;
    margin-top: 6px;
}
.mp-ack {
    display: flex;
    align-items: flex-start;
    gap: 10px;
    font-size: 13px;
    line-height: 1.5;
    color: #333;
    cursor: pointer;
    background: #fafbfc;
    border: 1px solid #e2e5ea;
    border-radius: 6px;
    padding: 12px 14px;
    max-width: 620px;
}
.mp-ack input[type="checkbox"] {
    width: 17px;
    height: 17px;
    margin-top: 1px;
    flex-shrink: 0;
    cursor: pointer;
}
.mp-ack.mp-ack-error {
    border-color: #dc2626;
    background: #fef2f2;
}

/* ---- Verification failure tips ---- */
.mp-error-tips {
    margin: 10px 0 0;
    padding-left: 18px;
    font-size: 12.5px;
    line-height: 1.55;
}
.mp-error-tips li { margin-bottom: 5px; }
.mp-error-tips li:last-child { margin-bottom: 0; }

/* ---- Confirmation code input ---- */
.mp-code-field {
    display: flex;
    align-items: center;
    gap: 12px;
}
.mp-code-input {
    font-family: "Courier New", monospace;
    font-size: 20px;
    font-weight: 700;
    letter-spacing: 6px;
    text-align: center;
    max-width: 180px;
}
.mp-code-input:disabled {
    background: #f0fdf4;
    border-color: #a3d5b3;
    color: #15803d;
}
.mp-verify-status {
    font-size: 13px;
    font-weight: 600;
    white-space: nowrap;
}
.mp-verify-checking { color: #888; }
.mp-verify-ok { color: #16a34a; }
.mp-verify-err { color: #c0392b; }

/* ---- Security card: settings list ---- */
.mp-setting {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 18px;
    padding: 16px 0;
    border-top: 1px solid #eef0f3;
}
.mp-setting:first-of-type {
    border-top: none;
    padding-top: 2px;
}
.mp-setting-info { min-width: 0; flex: 1 1 auto; }
.mp-setting-title {
    font-size: 14px;
    font-weight: 600;
    color: #1a1a2e;
    margin-bottom: 3px;
}
.mp-setting-meta {
    font-size: 13px;
    color: #555;
    margin-bottom: 5px;
}
.mp-setting-meta strong { color: #0f3460; font-weight: 600; }
.mp-setting-desc {
    font-size: 12.5px;
    line-height: 1.55;
    color: #8a8a96;
    margin: 0;
}
.mp-setting-btn {
    flex-shrink: 0;
    min-width: 148px;
    justify-content: center;
    text-align: center;
    white-space: nowrap;
}
@media (max-width: 520px) {
    .mp-setting {
        flex-direction: column;
        align-items: stretch;
    }
    .mp-setting-btn { width: 100%; }
}

/* ---- Show/hide password toggle (matches the eye icon on login.php) ---- */
.mp-password-wrap {
    position: relative;
    /* Match .form-field's own cap (general.css: width:100%; max-width:520px) so the
       absolutely-positioned toggle anchors to the input's right edge, not to a
       full-width wrapper. Collapses to the container on mobile (wrap tracks the
       100%-width input under general.css's max-width:640px rule). */
    max-width: 520px;
}
.mp-password-wrap .form-field {
    padding-right: 44px;
}
.mp-password-toggle {
    position: absolute;
    top: 50%;
    right: 8px;
    transform: translateY(-50%);
    background: none;
    border: none;
    padding: 4px;
    cursor: pointer;
    color: #888;
    display: inline-flex;
    align-items: center;
    justify-content: center;
}
.mp-password-toggle:hover,
.mp-password-toggle.is-showing { color: #0f3460; }

/* ---- Password requirements checklist ---- */
.pwd-reqs-wrap { margin-top: 8px; }
.pwd-reqs {
    list-style: none;
    margin: 6px 0 0;
    padding: 0;
}
.pwd-req {
    display: flex;
    align-items: center;
    gap: 8px;
    font-size: 13px;
    line-height: 1.75;
    color: #888;
    transition: color 0.15s ease;
}
.pwd-req-icon {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 16px;
    height: 16px;
    flex-shrink: 0;
    font-size: 12px;
    line-height: 1;
}
.pwd-req.unmet .pwd-req-icon::before { content: '\25CB'; color: #b6b6c0; }
.pwd-req.met .pwd-req-icon::before { content: '\2713'; color: #16a34a; }
.pwd-req.met { color: #16a34a; }

/* ---- Confirm-password match indicator ---- */
.mp-match {
    font-size: 13px;
    font-weight: 600;
    margin: 6px 0 0;
    min-height: 18px;
}
.mp-match-ok { color: #16a34a; }
.mp-match-err { color: #c0392b; }

/* ---- Password-changed success modal ---- */
.mp-success-modal {
    width: 420px;
    max-width: 94vw;
}
.mp-success-body {
    padding: 32px 28px 26px;
    text-align: center;
}
.mp-success-icon {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 64px;
    height: 64px;
    border-radius: 50%;
    background: #e7f8ee;
    color: #16a34a;
    margin-bottom: 16px;
    animation: mpSuccessPop .25s ease;
}
@keyframes mpSuccessPop {
    from { transform: scale(0.7); opacity: 0; }
    to   { transform: scale(1); opacity: 1; }
}
.mp-success-title {
    font-size: 19px;
    font-weight: 700;
    color: #1a1a2e;
    margin: 0 0 8px;
}
.mp-success-text {
    font-size: 14px;
    line-height: 1.6;
    color: #555;
    margin: 0 auto 20px;
    max-width: 320px;
}
.mp-success-btn {
    min-width: 200px;
}
.mp-success-note {
    font-size: 12px;
    color: #999;
    margin: 14px 0 0;
}

/* ---- 2FA challenge (page=authentication) ---- */
.mp-logout-link {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    font-size: 13px;
    color: #ccc;
    text-decoration: none;
    border: 1px solid rgba(255,255,255,.15);
    border-radius: 4px;
    padding: 7px 14px;
}
.mp-logout-link:hover { background: rgba(255,255,255,.08); color: #fff; }
.mp-logout-link svg { opacity: .7; }

/* Code field: comfortably fits the longer numeric email code (e.g. 220327959)
   while keeping the tighter 6-digit look for Authenticator codes. */
.mp-authn-field { max-width: 360px; }
.mp-code-input--long {
    max-width: 320px;
    width: 100%;
    letter-spacing: 4px;
    font-size: 22px;
    padding-left: 14px;
    padding-right: 14px;
}

/* Collapsible email-delivery help below the card. */
.mp-authn-help { margin-top: 4px; }
.mp-authn-help-body {
    font-size: 13.5px;
    line-height: 1.65;
    color: #2b2b3a;
}
.mp-authn-help-body p { margin: 0 0 12px; }
.mp-authn-help-body p:last-child { margin-bottom: 0; }
.mp-authn-help-body strong { color: #1a1a2e; }
.mp-authn-maillist {
    list-style: none;
    margin: 8px 0 14px;
    padding: 0;
    display: flex;
    flex-wrap: wrap;
    gap: 6px 8px;
}
.mp-authn-maillist code {
    font-family: "Courier New", monospace;
    font-size: 13px;
    font-weight: 700;
    color: #0f3460;
    background: #eef2fb;
    border: 1px solid #c9d6f0;
    border-radius: 4px;
    padding: 4px 9px;
}

/* ---- Login code display ---- */
.mp-code-row {
    display: flex;
    align-items: center;
    gap: 16px;
    flex-wrap: wrap;
    margin-top: 6px;
}
.mp-login-code {
    font-family: "Courier New", monospace;
    font-size: 26px;
    font-weight: 700;
    letter-spacing: 6px;
    color: #16a34a;
    min-height: 32px;
}

/* ---- 2FA challenge (page=authentication): focused, centered gate ---- */
.mp-authn-page {
    max-width: 620px;
}
.mp-authn-page .page-header {
    text-align: center;
}
/* Center the code field block, its label, input and help text. */
.mp-authn-page .mp-authn-field {
    max-width: 100%;
    text-align: center;
}
.mp-authn-page .mp-authn-field .form-label {
    text-align: center;
}
.mp-authn-page .mp-code-input {
    max-width: 200px;
    margin-left: auto;
    margin-right: auto;
}
.mp-authn-page .mp-code-input--long {
    max-width: 280px;
}
.mp-authn-page .form-help-text {
    text-align: center;
}
/* Center the "trust this location" acknowledgement as a tidy block. */
.mp-authn-page .mp-ack {
    justify-content: center;
    text-align: left;
    max-width: 340px;
    margin-left: auto;
    margin-right: auto;
}
/* Center the Authenticate action; full-width on small screens. */
.mp-authn-page .save-actions {
    justify-content: center;
}
.mp-authn-page .save-actions .btn-primary {
    min-width: 200px;
    justify-content: center;
}
@media (max-width: 768px) {
    .mp-authn-page .save-actions {
        flex-direction: column;
    }
    .mp-authn-page .save-actions .btn-primary {
        width: 100%;
    }
}

/* ---- Website Terms / User Agreement gate (page=useragreement) ---- */
.mp-page-wide { max-width: 900px; }
.mp-agreement-page .page-header { text-align: center; }
/* Trusted admin-authored Message_HTML; readable bounds. The box grows with its
   content (no inner scrollbar) so an embedded iframe governs its own height. */
.mp-agreement-content {
    padding: 4px 4px 20px;
    margin-bottom: 20px;
    border-bottom: 1px solid #e5e7eb;
    line-height: 1.6;
    word-wrap: break-word;
}
.mp-agreement-content img { max-width: 100%; height: auto; }
.mp-agreement-content table { max-width: 100%; }
/* Mailchimp announcement embed: fill the panel width, center it, and give it a
   large viewport-relative height so the whole page scrolls rather than a tiny
   inner box. width !important defeats any inline width baked into the DB HTML. */
.mp-agreement-content iframe {
    display: block;
    width: 100% !important;
    max-width: 100% !important;
    min-height: 80vh;
    border: 0;
    margin: 0 auto;
}
.mp-agreement-page .save-actions { justify-content: center; }
.mp-agreement-page .save-actions .btn-primary {
    min-width: 240px;
    justify-content: center;
}
@media (max-width: 768px) {
    .mp-agreement-page .save-actions { flex-direction: column; }
    .mp-agreement-page .save-actions .btn-primary { width: 100%; }
}
@media (max-width: 700px) {
    .mp-agreement-content iframe { min-height: 65vh; }
}
