/* Private calls on every page (private-call.js): the incoming-call card. A solid panel with a shadow;
   the page behind it is left exactly as it is. */
.private-call-card {
    position: fixed;
    top: 72px;
    right: 16px;
    z-index: 3000;
    display: flex;
    align-items: center;
    gap: 10px;
    width: 340px;
    max-width: calc(100vw - 32px);
    padding: 12px;
    border-radius: 16px;
    border: 1px solid #2a2f3b;
    background: #0d0f14;
    box-shadow: 0 16px 40px rgba(0, 0, 0, 0.6);
    color: #fff;
}

.private-call-card[hidden] { display: none; }

.private-call-card-avatar { position: relative; flex: none; width: 48px; height: 48px; }
.private-call-card-avatar img { width: 100%; height: 100%; border-radius: 50%; object-fit: cover; }
.private-call-card-avatar::after {
    content: '';
    position: absolute;
    inset: 0;
    border-radius: 50%;
    border: 2px solid rgba(46, 160, 67, 0.7);
    animation: private-call-pulse 1.6s ease-out infinite;
}

@keyframes private-call-pulse {
    from { transform: scale(1); opacity: 0.9; }
    to { transform: scale(1.7); opacity: 0; }
}

.private-call-card-text { flex: 1; min-width: 0; }
.private-call-card-name { display: flex; align-items: center; gap: 6px; font-size: 14px; font-weight: 700; }
.private-call-card-who { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.private-call-card-level { flex: none; padding: 1px 6px; border-radius: 999px; background: #2563eb; font-size: 10px; }
.private-call-card-kind { margin-top: 2px; font-size: 11px; color: #94a3b8; }
.private-call-card-price { margin-top: 4px; font-size: 11px; }
.private-call-card-price.is-you-pay { color: #fbbf24; }
.private-call-card-price.is-free { color: #4ade80; }
.private-call-card-note { margin-top: 4px; font-size: 11px; color: #fca5a5; }

.private-call-accept,
.private-call-reject {
    flex: none;
    width: 40px;
    height: 40px;
    padding: 0;
    border: 0;
    border-radius: 50%;
    color: #fff;
    font-size: 16px;
    cursor: pointer;
}

.private-call-accept { background: #2ea043; }
.private-call-reject { background: #da3633; }
.private-call-reject i { transform: rotate(135deg); }

.private-call-card-close {
    position: absolute;
    top: -8px;
    left: -8px;
    width: 22px;
    height: 22px;
    padding: 0;
    border-radius: 50%;
    border: 1px solid #2a2f3b;
    background: #1a1d24;
    color: #94a3b8;
    font-size: 10px;
    cursor: pointer;
}

@media (max-width: 767.98px) {
    .private-call-card { top: 8px; left: 8px; right: 8px; width: auto; max-width: none; border-radius: 18px; }
}

/* The "Start a private call" sheet: a centred dialog on desktop, a bottom sheet on phones. Its layer is
   see-through: it only catches clicks outside the sheet. */
.private-call-sheet-layer {
    position: fixed;
    inset: 0;
    z-index: 2900;
    display: flex;
    align-items: center;
    justify-content: center;
    background: transparent;
}

.private-call-sheet {
    position: relative;
    width: 360px;
    max-width: calc(100vw - 32px);
    padding: 18px;
    border-radius: 18px;
    border: 1px solid #2a2f3b;
    background: #0d0f14;
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.7);
    color: #fff;
}

.private-call-sheet-close {
    position: absolute;
    top: 12px;
    right: 12px;
    width: 28px;
    height: 28px;
    padding: 0;
    border-radius: 50%;
    border: 1px solid #334155;
    background: transparent;
    color: #94a3b8;
    cursor: pointer;
}

.private-call-sheet-title { padding-right: 36px; font-size: 16px; font-weight: 800; }
.private-call-sheet-sub { margin-top: 4px; font-size: 12px; color: #94a3b8; }
.private-call-sheet-kinds { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; margin: 14px 0; }
.private-call-sheet-kind {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 6px;
    padding: 12px;
    border-radius: 12px;
    border: 1px solid #2a2f3b;
    background: #1a1d24;
    color: #fff;
    font-size: 13px;
    cursor: pointer;
}
.private-call-sheet-kind i { font-size: 18px; }
.private-call-sheet-kind.is-active { border-color: #fbbf24; background: #2a1f0a; }
.private-call-sheet-gift { display: flex; align-items: center; gap: 10px; padding: 10px 12px; border-radius: 12px; background: #1a1d24; }
.private-call-sheet-gift img { width: 36px; height: 36px; object-fit: contain; }
.private-call-sheet-gift-text { flex: 1; min-width: 0; }
.private-call-sheet-gift-name { font-size: 13px; font-weight: 700; }
.private-call-sheet-price { font-size: 12px; color: #fde68a; }
.private-call-sheet-balance { flex: none; font-size: 11px; color: #94a3b8; }
.private-call-sheet-start {
    width: 100%;
    height: 44px;
    margin-top: 14px;
    border: 0;
    border-radius: 999px;
    background: linear-gradient(120deg, #fbbf24, #f59e0b 55%, #f97316);
    color: #111;
    font-size: 13px;
    font-weight: 800;
    cursor: pointer;
}
.private-call-sheet-start:disabled { opacity: 0.6; cursor: default; }
.private-call-sheet-error { margin-top: 12px; padding: 8px 12px; border-radius: 10px; background: #3b1518; color: #fecaca; font-size: 12px; }
.private-call-sheet-error[hidden] { display: none; }
.private-call-sheet-error + .private-call-sheet-start { margin-top: 10px; }

/* The buttons that open it */
/* A profile's one Call button: green, as free calls are; its menu marks the paid call in gold */
.profile-call-btn { background: #0f2a1c; border: 1px solid #1f7a4a; color: #6ee7a8; font-weight: 700; }
.profile-call-btn:hover, .profile-call-btn:focus-visible { background: #14532d; border-color: #22c55e; color: #bbf7d0; }
.profile-call-caret { font-size: 0.7em; opacity: 0.8; }
.private-call-pill {
    display: inline-flex;
    align-items: center;
    gap: 4px;
    height: 24px;
    margin-left: 0.25rem;
    padding: 0 8px;
    border: 0;
    border-radius: 999px;
    background: linear-gradient(120deg, #fbbf24, #f97316);
    color: #111;
    font-size: 0.7rem;
    font-weight: 800;
    cursor: pointer;
}

@media (max-width: 767.98px) {
    .private-call-sheet-layer { align-items: flex-end; }
    .private-call-sheet { width: 100%; max-width: none; border-radius: 20px 20px 0 0; border-bottom: 0; }
    .profile-call-btn { order: -1; }
}

/* Voice and video call buttons in the chat header: the wrapper only groups them */
.chat-call-buttons { display: contents; }
.chat-call-buttons[hidden] { display: none; }
.private-call-sheet-gift[hidden] { display: none; }

/* Extras */
.private-call-alert {
    position: fixed;
    left: 50%;
    top: 96px;
    z-index: 3000;
    width: 320px;
    max-width: calc(100vw - 32px);
    transform: translateX(-50%);
    padding: 16px;
    border-radius: 16px;
    border: 1px solid #f59e0b;
    background: #0d0f14;
    box-shadow: 0 16px 40px rgba(0, 0, 0, 0.6);
    color: #fff;
    text-align: center;
}
.private-call-alert[hidden] { display: none; }
.private-call-alert-title { font-weight: 800; color: #fbbf24; }
.private-call-alert-text { margin: 6px 0 12px; font-size: 13px; }
.private-call-alert-ok { padding: 8px 28px; border: 0; border-radius: 999px; background: #1f6feb; color: #fff; font-weight: 700; cursor: pointer; }
.missed-calls-badge { margin-left: 4px; }
