/* ───────────────────────────────────────────────────────────────────────────
   Public family Visitor Portal — styles for the /website/visitor/* self-service
   messaging + voice screens. Scoped under .vp-portal (set on each page wrapper)
   so these rules never bleed into the staff JMS UI. Phone-first / responsive.
   ─────────────────────────────────────────────────────────────────────────── */

.vp-portal {
    --vp-primary: #1a237e;
    --vp-accent: #42a5f5;
    max-width: 640px;
    margin: 0 auto;
    color: #1f2430;
    font-family: 'Segoe UI', Roboto, 'Helvetica Neue', Arial, sans-serif;
}

.vp-portal h1 { font-size: 1.5rem; font-weight: 700; margin: 0 0 .35rem; color: var(--vp-primary); }
.vp-portal h2 { font-size: 1.15rem; font-weight: 700; margin: 0 0 .35rem; }
.vp-sub { color: #5a6172; margin: 0 0 1.1rem; font-size: .95rem; }

.vp-card {
    background: #fff;
    border: 1px solid #e3e6ef;
    border-radius: 14px;
    padding: 1.5rem;
    box-shadow: 0 2px 10px rgba(26,35,126,.06);
}

.vp-portal label { display: block; font-weight: 600; font-size: .82rem; margin: .85rem 0 .3rem; color: #3a4256; }

.vp-input, .vp-textarea {
    width: 100%;
    border: 1px solid #cdd3e3;
    border-radius: 10px;
    padding: .7rem .85rem;
    font-size: 1rem;
    background: #fff;
    box-sizing: border-box;
}
.vp-input:focus, .vp-textarea:focus {
    outline: none;
    border-color: var(--vp-accent);
    box-shadow: 0 0 0 3px rgba(66,165,245,.18);
}

.vp-btn {
    display: block;
    width: 100%;
    margin-top: 1.1rem;
    border: none;
    border-radius: 10px;
    padding: .8rem 1rem;
    font-size: 1rem;
    font-weight: 700;
    color: #fff;
    background: var(--vp-primary);
    cursor: pointer;
}
.vp-btn:disabled { opacity: .6; cursor: default; }

.vp-link {
    display: inline-block;
    margin-top: 1rem;
    color: var(--vp-primary);
    font-weight: 600;
    text-decoration: none;
}
.vp-link:hover { text-decoration: underline; }

.vp-back { display: inline-block; margin-bottom: .75rem; color: var(--vp-primary); text-decoration: none; font-weight: 600; }
.vp-back:hover { text-decoration: underline; }

.vp-error {
    background: #fdecec; color: #b71c1c; border: 1px solid #f5c2c2;
    border-radius: 10px; padding: .7rem .85rem; margin-bottom: 1rem; font-size: .9rem;
}
.vp-info {
    background: #e8f1fd; color: #11407a; border: 1px solid #bcd7f5;
    border-radius: 10px; padding: .7rem .85rem; margin-bottom: 1rem; font-size: .9rem;
}
.vp-disclaimer { margin-top: 1.1rem; font-size: .78rem; color: #7a8195; line-height: 1.45; }
.vp-disclaimer .vp-rec-dot, .vp-disclosure .vp-rec-dot {
    display: inline-block; width: 9px; height: 9px; border-radius: 50%;
    background: #e53935; margin-right: .4rem; vertical-align: middle;
    animation: vp-pulse 1.4s infinite;
}
@keyframes vp-pulse { 0%,100% { opacity: 1; } 50% { opacity: .35; } }

.vp-spinner { padding: 2rem 0; text-align: center; color: #5a6172; }
.vp-empty { text-align: center; color: #5a6172; }

/* MFA enroll */
.vp-qr { display: block; margin: .5rem 0; width: 200px; height: 200px; image-rendering: pixelated; }
.vp-mono {
    font-family: 'Consolas', 'Courier New', monospace; font-size: 1.05rem; letter-spacing: 1px;
    background: #f4f6fb; border: 1px dashed #cdd3e3; border-radius: 8px; padding: .6rem .8rem; word-break: break-all;
}

/* Inmate list */
.vp-list { display: flex; flex-direction: column; gap: .6rem; }
.vp-inmate {
    display: flex; align-items: center; gap: .85rem;
    background: #fff; border: 1px solid #e3e6ef; border-radius: 12px;
    padding: .85rem 1rem; text-decoration: none; color: inherit;
}
.vp-inmate:hover { border-color: var(--vp-accent); }
.vp-avatar {
    flex: 0 0 auto; width: 42px; height: 42px; border-radius: 50%;
    background: var(--vp-primary); color: #fff; font-weight: 700;
    display: flex; align-items: center; justify-content: center;
}
.vp-inmate-name { font-weight: 700; }
.vp-inmate-sub { color: #7a8195; font-size: .85rem; }

/* Conversation */
.vp-conv-head { display: flex; align-items: center; justify-content: space-between; gap: 1rem; }
.vp-callbtn {
    background: #2e7d32; color: #fff; border-radius: 999px; padding: .45rem 1.1rem;
    text-decoration: none; font-weight: 700; font-size: .9rem;
}
.vp-thread {
    display: flex; flex-direction: column; gap: .55rem;
    padding: 1rem 0; max-height: 60vh; overflow-y: auto;
}
.vp-bubble {
    max-width: 80%; padding: .6rem .8rem; border-radius: 14px; font-size: .95rem; line-height: 1.4;
}
.vp-bubble.visitor { align-self: flex-end; background: var(--vp-primary); color: #fff; border-bottom-right-radius: 4px; }
.vp-bubble.inmate { align-self: flex-start; background: #eef1f8; color: #1f2430; border-bottom-left-radius: 4px; }
.vp-meta { margin-top: .3rem; font-size: .72rem; opacity: .75; }
.vp-attach { margin: .3rem 0; }
.vp-attach .doc { font-weight: 600; font-size: .85rem; }
.vp-badge {
    display: inline-block; margin-left: .35rem; font-size: .66rem; font-weight: 700;
    text-transform: uppercase; padding: .1rem .4rem; border-radius: 6px; vertical-align: middle;
}
.vp-badge.pending { background: #fff3cd; color: #8a6d00; }
.vp-badge.flagged { background: #fdecec; color: #b71c1c; }
.vp-badge.clean { background: #e7f6e9; color: #2e7d32; }

.vp-composer { border-top: 1px solid #e3e6ef; padding-top: .75rem; }
.vp-composer-row { display: flex; align-items: flex-end; gap: .5rem; }
.vp-textarea { resize: none; min-height: 44px; max-height: 140px; }
.vp-iconbtn {
    flex: 0 0 auto; width: 44px; height: 44px; border-radius: 50%;
    border: 1px solid #cdd3e3; background: #fff; color: var(--vp-primary);
    font-size: 1.4rem; line-height: 1; cursor: pointer;
    display: inline-flex; align-items: center; justify-content: center;
}
.vp-iconbtn.send { background: var(--vp-primary); color: #fff; border-color: var(--vp-primary); }
.vp-preview {
    display: flex; align-items: center; gap: .6rem; margin-bottom: .5rem;
    background: #f4f6fb; border: 1px solid #e3e6ef; border-radius: 10px; padding: .5rem .7rem;
}
.vp-preview img { width: 48px; height: 48px; object-fit: cover; border-radius: 8px; }
.vp-preview .name { flex: 1; font-size: .85rem; word-break: break-all; }

/* Voice call screen */
.vc-screen {
    text-align: center; padding: 2rem 1rem;
    background: #fff; border: 1px solid #e3e6ef; border-radius: 16px;
}
.vc-callee { font-size: 1.5rem; font-weight: 700; color: var(--vp-primary); }
.vc-status { color: #5a6172; margin-top: .35rem; }
.vc-timer { font-family: 'Consolas', 'Courier New', monospace; font-size: 2rem; margin: .75rem 0; }
.vc-disclosure {
    margin: 1.25rem auto; max-width: 360px; font-size: .82rem; color: #7a8195;
    background: #f4f6fb; border: 1px solid #e3e6ef; border-radius: 10px; padding: .6rem .8rem;
}
.vc-controls { display: flex; justify-content: center; gap: 1rem; margin-top: 1.25rem; }
.vc-ctrl {
    border: 1px solid #cdd3e3; background: #fff; color: #1f2430;
    border-radius: 999px; padding: .7rem 1.4rem; font-weight: 700; cursor: pointer;
}
.vc-ctrl.active { background: var(--vp-primary); color: #fff; border-color: var(--vp-primary); }
.vc-ctrl.hangup { background: #e53935; color: #fff; border-color: #e53935; }
