/* ═══════════════════════════════════════════════════════════════════════════
   TalkVatar Peer Talk Styles
   ═══════════════════════════════════════════════════════════════════════════ */

/* ── Layout ─────────────────────────────────────────────────────────────────── */
.tv-peer-app { max-width: 1100px; margin: 0 auto; font-family: inherit; }

/* ── Profile Setup ──────────────────────────────────────────────────────────── */
.tv-peer-setup { display: flex; align-items: center; justify-content: center; min-height: 60vh; padding: 20px; }
.tv-peer-setup-card {
    background: #fff; border-radius: 20px; padding: 40px;
    box-shadow: 0 8px 40px rgba(79,70,229,0.12);
    max-width: 500px; width: 100%; text-align: center;
}
.tv-peer-setup-icon { font-size: 3.5rem; margin-bottom: 12px; }
.tv-peer-setup-card h2 { margin: 0 0 6px; color: #1e293b; font-size: 1.5rem; }
.tv-peer-setup-sub { color: #64748b; margin: 0 0 28px; font-size: 0.9rem; }
.tv-peer-setup-form { text-align: left; }
.tv-peer-field { margin-bottom: 16px; }
.tv-peer-field label { display: block; font-weight: 600; font-size: 0.85rem; color: #374151; margin-bottom: 5px; }
.tv-peer-field input, .tv-peer-field select {
    width: 100%; padding: 10px 14px; border: 1.5px solid #e2e8f0;
    border-radius: 8px; font-size: 0.9rem; box-sizing: border-box;
    transition: border-color 0.2s;
}
.tv-peer-field input:focus, .tv-peer-field select:focus { border-color: #4f46e5; outline: none; }
.tv-peer-field small { color: #94a3b8; font-size: 0.75rem; }
.tv-peer-field-row { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; }
.tv-peer-location-notice {
    background: #f0f9ff; border: 1px solid #bae6fd; border-radius: 8px;
    padding: 10px 14px; font-size: 0.82rem; color: #0369a1; margin-bottom: 20px;
}
.tv-req { color: #ef4444; }

/* ── Top Bar ────────────────────────────────────────────────────────────────── */
.tv-peer-topbar { background: #fff; border-radius: 12px; padding: 12px 16px; margin-bottom: 14px; box-shadow: 0 2px 8px rgba(0,0,0,0.06); }
.tv-my-card { display: flex; align-items: center; gap: 12px; flex-wrap: wrap; }
.tv-peer-my-info { display: flex; align-items: center; gap: 10px; flex: 1; }
.tv-peer-my-info .tv-peer-avatar { font-size: 2rem; }
.tv-peer-my-info strong { display: block; color: #1e293b; }
.tv-peer-my-info small { color: #64748b; font-size: 0.8rem; }
.tv-toggle-wrap { display: flex; align-items: center; gap: 8px; cursor: pointer; }
.tv-toggle-wrap input { width: 18px; height: 18px; accent-color: #10b981; }
.tv-toggle-lbl { font-size: 0.82rem; font-weight: 600; }

/* ── Filters ────────────────────────────────────────────────────────────────── */
.tv-peer-filters {
    display: flex; gap: 20px; flex-wrap: wrap; align-items: center;
    background: #fff; border-radius: 12px; padding: 12px 16px;
    margin-bottom: 14px; box-shadow: 0 2px 8px rgba(0,0,0,0.06);
}
.tv-filter-group { display: flex; align-items: center; gap: 10px; }
.tv-filter-group label { font-size: 0.85rem; font-weight: 600; color: #374151; white-space: nowrap; }
.tv-filter-group .tv-select { padding: 6px 10px; border-radius: 8px; border: 1.5px solid #e2e8f0; font-size: 0.85rem; }
.tv-filter-group .tv-slider { width: 120px; accent-color: #4f46e5; }

/* ── Map + List Layout ──────────────────────────────────────────────────────── */
.tv-peer-layout { display: grid; grid-template-columns: 1fr 360px; gap: 14px; }
@media (max-width: 768px) { .tv-peer-layout { grid-template-columns: 1fr; } }

/* ── Map ────────────────────────────────────────────────────────────────────── */
.tv-peer-map-wrap { background: #fff; border-radius: 12px; overflow: hidden; box-shadow: 0 2px 8px rgba(0,0,0,0.06); }
.tv-peer-map { height: 420px; }
.tv-map-legend { padding: 8px 12px; font-size: 0.75rem; color: #64748b; background: #f8fafc; }
.tv-map-me { background: #4f46e5; color: #fff; border-radius: 50%; width: 32px; height: 32px; display:flex; align-items:center; justify-content:center; font-size: 0.65rem; font-weight:700; border: 2px solid #fff; box-shadow:0 2px 6px rgba(0,0,0,0.3); }
.tv-map-user { font-size: 1.4rem; width: 36px; height: 36px; display:flex; align-items:center; justify-content:center; background: rgba(255,255,255,0.9); border-radius: 50%; border: 2px solid #4f46e5; box-shadow:0 2px 6px rgba(0,0,0,0.2); cursor:pointer; }
.tv-map-me-legend { background:#4f46e5; color:#fff; padding:1px 6px; border-radius:4px; font-size:0.7rem; font-weight:700; }
.tv-map-popup { font-size: 0.85rem; }
.tv-map-popup strong { display:block; margin-bottom:4px; }

/* ── User List ──────────────────────────────────────────────────────────────── */
.tv-peer-list-wrap { background: #fff; border-radius: 12px; padding: 14px; box-shadow: 0 2px 8px rgba(0,0,0,0.06); display: flex; flex-direction: column; }
.tv-peer-list-title { margin: 0 0 12px; font-size: 0.95rem; color: #1e293b; }
.tv-peer-list { flex: 1; overflow-y: auto; max-height: 420px; display: flex; flex-direction: column; gap: 10px; }
.tv-peer-loading { text-align: center; padding: 40px; color: #94a3b8; }
.tv-peer-empty  { text-align: center; padding: 30px 20px; color: #94a3b8; }

/* ── User Card ──────────────────────────────────────────────────────────────── */
.tv-peer-card {
    display: flex; align-items: center; gap: 12px; padding: 12px;
    background: #f8fafc; border: 1.5px solid #e2e8f0; border-radius: 10px;
    transition: border-color 0.2s, box-shadow 0.2s;
}
.tv-peer-card:hover { border-color: #c7d2fe; box-shadow: 0 2px 8px rgba(79,70,229,0.1); }
.tv-peer-avatar-lg { font-size: 2.2rem; flex-shrink: 0; }
.tv-peer-card-info { flex: 1; min-width: 0; }
.tv-peer-card-name { font-weight: 700; color: #1e293b; font-size: 0.9rem; white-space:nowrap; overflow:hidden; text-overflow:ellipsis; }
.tv-peer-card-meta { display: flex; flex-wrap: wrap; gap: 4px; margin: 4px 0; }
.tv-peer-tag { padding: 2px 7px; border-radius: 12px; font-size: 0.72rem; background: #f1f5f9; color: #475569; }
.tv-peer-gender-male   { background: #dbeafe; color: #1d4ed8; }
.tv-peer-gender-female { background: #fce7f3; color: #be185d; }
.tv-peer-gender-other  { background: #f3f4f6; color: #374151; }
.tv-peer-online-dot { font-size: 0.75rem; }
.tv-peer-online-dot.available { color: #10b981; }
.tv-peer-online-dot.busy      { color: #ef4444; }
.tv-request-talk-btn { flex-shrink: 0; padding: 7px 14px !important; font-size: 0.82rem !important; }

/* ── Modals ─────────────────────────────────────────────────────────────────── */
.tv-peer-modal {
    position: fixed; inset: 0; background: rgba(15,23,42,0.55);
    z-index: 99999; display: flex; align-items: center; justify-content: center;
    backdrop-filter: blur(4px);
}
.tv-peer-modal-box {
    background: #fff; border-radius: 18px; padding: 32px 28px;
    max-width: 420px; width: 90%; text-align: center;
    box-shadow: 0 20px 60px rgba(0,0,0,0.25);
    animation: tv-modal-in 0.25s ease;
}
@keyframes tv-modal-in { from { transform: scale(0.9); opacity:0; } to { transform: scale(1); opacity:1; } }
.tv-peer-modal-box h3 { margin: 0 0 10px; font-size: 1.2rem; color: #1e293b; }
.tv-peer-modal-box p  { color: #475569; margin: 6px 0; font-size: 0.9rem; }
.tv-modal-actions { display: flex; gap: 10px; justify-content: center; margin-top: 20px; flex-wrap: wrap; }
.tv-peer-modal-box textarea { width: 100%; box-sizing: border-box; margin-top: 12px; border: 1.5px solid #e2e8f0; border-radius: 8px; padding: 10px; font-size: 0.9rem; resize: none; }
.tv-wait-spinner { font-size: 2.5rem; margin-bottom: 8px; animation: tv-spin 2s linear infinite; }
@keyframes tv-spin { from { transform: rotate(0deg); } to { transform: rotate(360deg); } }
.tv-wait-dots { color: #4f46e5; }
.tv-inc-ring { font-size: 3rem; animation: tv-ring 0.6s ease-in-out infinite alternate; }
@keyframes tv-ring { from { transform: rotate(-20deg); } to { transform: rotate(20deg); } }
.tv-inc-info { font-size: 0.82rem; color: #64748b; }
.tv-inc-message { font-style: italic; color: #475569; background: #f8fafc; padding: 8px 12px; border-radius: 8px; margin: 8px 0 0; }
.tv-btn-success { background: #10b981; color: #fff; border: none; padding: 10px 20px; border-radius: 8px; cursor: pointer; font-weight: 600; transition: background 0.2s; }
.tv-btn-success:hover { background: #059669; }

/* ── Call UI ────────────────────────────────────────────────────────────────── */
.tv-call-ui {
    position: fixed; bottom: 24px; right: 24px; z-index: 99998;
    animation: tv-slide-up 0.3s ease;
}
@keyframes tv-slide-up { from { transform: translateY(80px); opacity:0; } to { transform: translateY(0); opacity:1; } }
.tv-call-box {
    background: linear-gradient(135deg, #4f46e5, #7c3aed);
    color: #fff; border-radius: 18px; padding: 20px 22px;
    width: 300px; box-shadow: 0 12px 40px rgba(79,70,229,0.4);
}
.tv-call-header { display: flex; align-items: center; gap: 12px; margin-bottom: 16px; }
.tv-call-partner-icon { font-size: 2.2rem; }
.tv-call-partner-name { font-weight: 700; font-size: 1rem; }
.tv-call-status { font-size: 0.8rem; opacity: 0.8; }
.tv-call-timer { margin-left: auto; font-size: 1.1rem; font-weight: 700; font-variant-numeric: tabular-nums; }
.tv-sound-wave { display: flex; align-items: center; gap: 4px; justify-content: center; height: 40px; margin: 0 0 14px; }
.tv-sound-wave span { width: 4px; background: rgba(255,255,255,0.7); border-radius: 4px; animation: tv-wave 1s ease-in-out infinite; }
.tv-sound-wave span:nth-child(1) { animation-delay:0s; }
.tv-sound-wave span:nth-child(2) { animation-delay:0.1s; }
.tv-sound-wave span:nth-child(3) { animation-delay:0.2s; }
.tv-sound-wave span:nth-child(4) { animation-delay:0.3s; }
.tv-sound-wave span:nth-child(5) { animation-delay:0.4s; }
@keyframes tv-wave { 0%,100%{height:8px} 50%{height:32px} }
.tv-call-tip { font-size: 0.75rem; opacity: 0.75; background: rgba(255,255,255,0.12); border-radius: 8px; padding: 7px 10px; margin-bottom: 14px; }
.tv-call-actions { display: flex; gap: 10px; }
.tv-call-actions .tv-btn { flex: 1; justify-content: center; }
.tv-call-actions .tv-btn-outline { background: rgba(255,255,255,0.15); border-color: rgba(255,255,255,0.4); color: #fff; }
.tv-call-actions .tv-btn-outline:hover { background: rgba(255,255,255,0.25); }
.tv-call-actions .tv-btn-outline.muted { background: rgba(239,68,68,0.3); }

/* ── Toast Notifications ────────────────────────────────────────────────────── */
.tv-toast {
    position: fixed; bottom: 24px; left: 50%; transform: translateX(-50%) translateY(80px);
    color: #fff; padding: 12px 24px; border-radius: 100px;
    font-size: 0.88rem; font-weight: 600; z-index: 999999;
    box-shadow: 0 8px 30px rgba(0,0,0,0.2); transition: transform 0.35s ease, opacity 0.35s;
    opacity: 0; white-space: nowrap;
}
.tv-toast.tv-toast-show { transform: translateX(-50%) translateY(0); opacity: 1; }
