/* style-panels.css - the DESIGN of: pop-up panels, profile, requests, QR scan, paperclip menu, + menu / add friend. Part of the old single style.css (split 2026-11-03); loaded in the order listed in index.html. */
/* --- panels / modal --- */
.panel {
  position: fixed; inset: 0; z-index: 10; display: flex; align-items: flex-end;
  background: rgba(0,0,0,0.5);
}
.panel-inner {
  background: #1C1C1E; width: 100%; max-height: 88vh; overflow-y: auto;
  border-radius: 16px 16px 0 0; padding: 20px; display: flex; flex-direction: column; gap: 4px;
}
.panel-inner h2 { margin: 0 0 8px; }
.panel-inner h3 { margin: 14px 0 4px; font-size: 14px; color: #9A9A9A; }
.panel-inner h3:first-of-type { margin-top: 4px; }
/* Checkbox-only rows (as opposed to a label sitting above a text/select
   field) read better as a compact horizontal row than the generic
   label's stacked column layout. */
label.toggle-row { flex-direction: row; align-items: center; gap: 8px; margin: 0; }
label.toggle-row input[type=checkbox] { margin: 0; }
/* Two-column "cell" layout for the settings panel - short toggles pack
   two per row instead of each claiming the full width; anything that
   needs more room (a select pair, a textarea, a section heading) spans
   both columns via .span-2, like a merged cell. */
.settings-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 10px 12px; align-items: start; }
.settings-grid > .span-2 { grid-column: 1 / -1; }
.settings-grid > h3 { margin: 10px 0 0; }
.settings-grid > .row { margin: 0; }
.panel-inner .row { display: flex; gap: 10px; align-items: center; }
.panel-inner .row > label { flex: 1; }
.panel-inner .row select, .panel-inner .row input { flex: 1; }
#invite-result { font-size: 13px; word-break: break-all; color: #9A9A9A; margin: 6px 0; }

/* --- profile panel --- */
.profile-header { display: flex; justify-content: center; padding: 8px 0; }
/* Kuma 2026-11-03: round X that stays pinned at the top while the profile scrolls; X centred in the circle (svg);
   zero-height wrapper so it takes no space; bigger picture and less empty space at the top */
#profile-panel .panel-inner { padding-top: 8px; }
.panel-x-wrap { position: sticky; top: 8px; height: 0; z-index: 5; display: flex; justify-content: flex-end; align-self: stretch; }
.panel-x { width: 40px; height: 40px; padding: 0; border: 0; border-radius: 50%; background: rgba(60,60,64,.92);
  display: flex; align-items: center; justify-content: center; cursor: pointer; }
#profile-avatar.avatar-lg { width: 120px; height: 120px; font-size: 40px; }
#profile-username { text-align: center; margin: 4px 0; }
.bio { text-align: center; color: #9A9A9A; font-size: 14px; margin-bottom: 8px; }
#profile-action { display: flex; justify-content: center; gap: 8px; margin: 8px 0; }

/* --- requests / member list / search / invite-picker rows --- */
#incoming-requests, #outgoing-requests, #group-invites, #s-member-list,
#friend-search-results, #invite-picker-list {
  list-style: none; margin: 0; padding: 0;
}
#incoming-requests li, #outgoing-requests li, #group-invites li, #s-member-list li,
#friend-search-results li, #invite-picker-list li {
  display: flex; align-items: center; gap: 10px; padding: 8px 0; border-bottom: 1px solid #232325;
}
#s-member-list .avatar, #invite-picker-list .avatar { cursor: pointer; }
.req-name { flex: 1; font-weight: 600; }
.req-actions { display: flex; gap: 6px; }

/* --- QR scan area --- */
#qr-scan-area { display: flex; flex-direction: column; align-items: center; gap: 8px; }
#qr-video {
  width: 100%; max-width: 320px; aspect-ratio: 1 / 1; object-fit: cover;
  border-radius: 12px; background: #000;
}
#qr-status { text-align: center; }

@media (min-width: 640px) {
  .auth-card { max-width: 360px; }
  .panel { align-items: center; justify-content: center; }
  .panel-inner { max-width: 420px; border-radius: 16px; }
}

/* 2026-10-06: picture/video job banner (shown while Kappy makes something; countdown + progress bar) */
#creation-banner { padding: 8px 14px 9px; background: #2A2540; color: #E4DBFF; font-size: 13.5px; border-bottom: 1px solid rgba(255,255,255,0.08); }
#creation-banner-bar { height: 4px; margin-top: 6px; border-radius: 2px; background: rgba(255,255,255,0.12); overflow: hidden; }
#creation-banner-fill { height: 100%; width: 0%; background: #9B87F5; transition: width 1s linear; }


/* --- paperclip menu + creation form (2026-10-06) --- */
#attach-menu {
  margin: 0 8px 6px; align-self: flex-start; min-width: 250px; max-width: calc(100% - 16px);
  background: #1C1C1E; border: 1px solid #2C2C2E; border-radius: 14px; padding: 6px;
  box-shadow: 0 4px 18px rgba(0,0,0,0.55); display: flex; flex-direction: column; gap: 2px;
}
#attach-menu button { background: transparent; color: #EDEDED; text-align: left; padding: 11px 12px; border-radius: 9px; font-size: 15px; }
#attach-menu button:active { background: #2A2A2C; }
#attach-menu .menu-sep { height: 1px; background: #2C2C2E; margin: 4px 6px; }
#attach-menu .menu-note { color: #9A9A9A; font-size: 12px; padding: 6px 12px 8px; }
#create-form { display: flex; flex-direction: column; gap: 10px; }
#create-form label { display: flex; flex-direction: column; gap: 4px; font-size: 13px; color: #9A9A9A; }
#create-form .row { display: flex; gap: 10px; align-items: flex-end; }
#create-form .row > * { flex: 1; }
.hint { font-size: 13px; color: #9A9A9A; margin: 0 0 6px; }
audio.attachment { width: 100%; max-width: 320px; margin-top: 4px; }

/* the "+" menu and the one add-a-friend screen (2026-11-02) */
.plus-menu button[data-a="friend"], .plus-menu button[data-a="group"] { display: grid; grid-template-columns: 40px 1fr; grid-template-rows: auto auto; text-align: left; width: 100%; margin: 6px 0; padding: 12px; }
.plus-menu button span { grid-row: 1 / 3; font-size: 28px; align-self: center; }
.plus-menu button small { font-weight: 400; opacity: .8; }
.my-qr-box { display: flex; gap: 12px; align-items: center; background: #fff; color: #000; border-radius: 14px; padding: 10px; margin-bottom: 10px; }
.my-qr-box img { width: 120px; height: 120px; flex-shrink: 0; }
.my-qr-box .note { color: #333; }
.qr-scan-title { margin: 4px 0; }

#google-signin-box { margin-top: 10px; display: flex; flex-direction: column; align-items: center; gap: 8px; }
.or-line { color: #8E8E93; font-size: 13px; }

