/* style-r5-icons.css - design round 5, JOB 3 (+ the icon part of job 4): THE ICON FAMILY. The emoji in the top bar, chat header, back arrows and compose bar are now inline SVG (sprite in index.html, <use href="#i-..."/>),
   one stroke style (24px grid, 1.8 stroke, round caps), coloured by `currentColor`. Loaded after style-r5-avatars.css. Ids / classes JS uses are unchanged. */
.ico { width: 20px; height: 20px; fill: none; stroke: currentColor; stroke-width: 1.8; stroke-linecap: round; stroke-linejoin: round; flex: none; display: block; pointer-events: none; }

/* ---------- the home top bar ---------- */
.topbar { padding-left: max(12px, env(safe-area-inset-left)); padding-right: max(10px, env(safe-area-inset-right)); }
#chat-list-view .topbar { padding-top: max(6px, env(safe-area-inset-top)); padding-bottom: 6px; gap: 6px; }
.top-icons { gap: 2px; flex: none; }
.top-icon { position: relative; min-width: 42px; min-height: 52px; padding: 3px 1px 2px; gap: 3px; border-radius: 14px; color: #E6E6EA; justify-content: flex-start;
  transition: transform .14s cubic-bezier(.2, .8, .2, 1), background-color .15s; -webkit-tap-highlight-color: transparent; }
.top-icon:active { transform: scale(.9); background: rgba(255, 255, 255, .06); }
@media (hover: hover) { .top-icon:hover .ti-circle { transform: translateY(-1px); border-color: var(--ti, #5A5A66); } }
.ti-circle { --ti: #4A4A55; width: 36px; height: 36px; font-size: 0; color: var(--ti-c, #E6E6EA); border: 1.5px solid var(--ti); background: linear-gradient(160deg, #303036, #232327);
  box-shadow: 0 2px 6px rgba(0, 0, 0, .4), 0 1px 0 rgba(255, 255, 255, .07) inset; transition: transform .15s cubic-bezier(.2, .8, .2, 1), border-color .15s, box-shadow .15s; }
.ti-circle .ico { width: 19px; height: 19px; }
.ti-label { font-size: 10px; font-weight: 600; letter-spacing: .02em; color: #B4B4BC; line-height: 1.1; max-width: 52px; text-align: center; overflow-wrap: anywhere; }
/* each icon keeps the colour it already had, the family does the rest */
#btn-music .ti-circle { --ti: #4FA8FF; --ti-c: #8CC8FF; background: linear-gradient(160deg, #22344A, #1A2633); }
#btn-top-radio .ti-circle { --ti: #8E7CFF; --ti-c: #B9AEFF; background: linear-gradient(160deg, #332C5C, #241F3D); }
#btn-top-bar .ti-circle { --ti: #FFB547; --ti-c: #FFCB78; background: linear-gradient(160deg, #46341A, #2E2412); }
#btn-top-cal .ti-circle { --ti: #34C759; --ti-c: #7DF0A8; background: linear-gradient(160deg, #1F4630, #17301F); }
#btn-top-ride .ti-circle { --ti: #FFD60A; --ti-c: #FFE15C; background: linear-gradient(160deg, #46401A, #2E2A12); }
#btn-requests .ti-circle { --ti: #FF8A7E; --ti-c: #FFB0A6; background: linear-gradient(160deg, #4A2622, #321A18); }
#btn-top-plus .ti-circle { --ti: #1BDB6D; --ti-c: #04200E; background: linear-gradient(160deg, #3CE680, #06C755); border-color: rgba(255, 255, 255, .35); box-shadow: 0 3px 10px rgba(6, 199, 85, .45), 0 1px 0 rgba(255, 255, 255, .4) inset; }
#btn-top-plus .ti-circle .ico { stroke-width: 2.4; }
#btn-top-plus .ti-label { color: #7DF0A8; }
/* the notification dot: crisp ring, pulse while something waits */
#requests-badge, .badge-dot { width: 11px; height: 11px; top: -2px; right: -2px; border: 2px solid #1C1C1E; background: #FF5A4E; box-shadow: 0 0 0 0 rgba(255, 90, 78, .6); }
.badge-dot:not(.hidden) { animation: r5Ping 1.6s ease-out infinite; }
@keyframes r5Ping { 0% { box-shadow: 0 0 0 0 rgba(255, 90, 78, .6); } 70%, 100% { box-shadow: 0 0 0 7px rgba(255, 90, 78, 0); } }
#btn-requests.has-alert .ti-circle, #cq-alerts.has-alert { animation-duration: 1.8s; }
/* never cramped: with more icons shown (Alerts + Radio switched on) the labels shrink and the name gives way */
@media (max-width: 400px) { .top-icon { min-width: 40px; } .ti-circle { width: 34px; height: 34px; } .ti-label { font-size: 9.5px; } #chat-list-view .me-identity #me-username { max-width: 22vw; } }
@media (max-width: 350px) { .ti-label { display: none; } .top-icon { min-height: 40px; } }

/* ---------- inside a chat: header + quick icons ---------- */
.topbar .icon-btn { width: 44px; height: 44px; min-width: 44px; padding: 0; display: inline-flex; align-items: center; justify-content: center; border-radius: 50%; color: #E6E6EA; background: transparent; transition: background-color .15s, transform .12s; }
.topbar .icon-btn:active { background: rgba(255, 255, 255, .1); transform: scale(.92); }
.topbar .icon-btn .ico { width: 22px; height: 22px; }
.topbar .icon-btn .ico + .ico { margin-left: 0; }
#btn-chat-games { color: #7DF0A8; background: rgba(6, 199, 85, .14); box-shadow: 0 0 0 1.5px rgba(52, 199, 89, .55) inset; } #btn-chat-games:active { background: rgba(6, 199, 85, .26); }
#btn-chat-music { color: #8CC8FF; background: rgba(79, 168, 255, .12); }
.chat-quick { gap: 6px; }
.cq-btn { width: 38px; height: 38px; font-size: 0; color: #E6E6EA; border: 1.5px solid #4A4A55; background: linear-gradient(160deg, #303036, #232327); box-shadow: 0 2px 6px rgba(0, 0, 0, .4), 0 1px 0 rgba(255, 255, 255, .07) inset; transition: transform .12s, border-color .15s; }
.cq-btn:active { transform: scale(.9); }
.cq-btn .ico { width: 18px; height: 18px; }
#cq-music { border-color: #4FA8FF; color: #8CC8FF; background: linear-gradient(160deg, #22344A, #1A2633); }
#cq-cal { border-color: #34C759; color: #7DF0A8; background: linear-gradient(160deg, #1F4630, #17301F); }
#cq-alerts { border-color: #FF8A7E; color: #FFB0A6; }

/* ---------- compose bar icons ---------- */
.send-bar .icon-btn .ico { width: 21px; height: 21px; }
#btn-mic { color: #D8D8DC; } #btn-mic:active { color: #FF8A7E; }
#btn-compose-back .ico { width: 22px; height: 22px; }

/* ---------- other screens' back arrows ---------- */
#btn-radio-back, #btn-ride-back, #btn-cal-back, #btn-bar-back { color: #E6E6EA; }

@media (prefers-reduced-motion: reduce) { .badge-dot, .top-icon, .ti-circle, .cq-btn, .topbar .icon-btn { animation: none !important; transition: none !important; } .top-icon:active, .topbar .icon-btn:active { transform: none; } }
