/* pwa-chrome.css — the chrome Ear Tuner and Practice Buddy (apps/microbreaker) share: the corner buttons, the settings panel's frame,
   the reset dialog, the Welcome overlay and the voice-command transcript echo (style-frontier C8).
   Delivered to those two apps only (packages/shared/lib/assets.sh) and linked before each app's own style.css (shared base first).
   Reads only custom properties both apps define: --safe-*, --font, --color-bg-panel, --color-green*, --color-parchment. */

/* Corner buttons (fixed, lower right and lower left) */
#info-btn {
  position: fixed; bottom: 0; right: calc(var(--safe-r) + 14px);
  background: none; border: none; color: rgba(255,255,255,0.36);
  cursor: pointer; padding: 10px; z-index: 250; -webkit-appearance: none;
  transition: color 0.15s, opacity 0.2s; /* Practice Buddy fades it with style.opacity (render.js) */
}
#info-btn:active { color: rgba(255,255,255,0.72); }
#settings-btn {
  position: fixed; bottom: 0; left: calc(var(--safe-l) + 14px);
  background: none; border: none; color: rgba(255,255,255,0.36);
  cursor: pointer; padding: 10px; z-index: 250; -webkit-appearance: none;
  transition: color 0.15s;
}
#settings-btn:active { color: rgba(255,255,255,0.72); }

/* Settings panel frame and its Done button */
#settings-overlay {
  display: none; position: fixed; inset: 0;
  background: var(--color-bg-panel);
  z-index: 200; flex-direction: column;
  font-family: var(--font); color: #fff;
}
#settings-overlay.open { display: flex; }
#s-done-btn {
  position: fixed; top: calc(var(--safe-top) + 8px); right: calc(var(--safe-r) + 10px);
  background: none; border: none; border-radius: 999px;
  color: var(--color-green-light, #4d9966);
  cursor: pointer; padding: 6px;
  z-index: 210; -webkit-appearance: none;
  display: flex; align-items: center; justify-content: center;
  transition: background 0.15s, color 0.15s;
}
#s-done-btn:hover  { background: rgba(77, 153, 102, 0.18); color: #7dbf95; }
#s-done-btn:active { background: rgba(77, 153, 102, 0.30); }
#s-done-btn svg { width: 36px; height: 36px; display: block; pointer-events: none; }
.tog-label { font-size: clamp(15px, 4.2vw, 18px); font-weight: 300; }

/* Reset dialog */
#reset-overlay {
  display: none; position: fixed; inset: 0; z-index: 400;
  background: rgba(0,0,0,0.75); align-items: center; justify-content: center;
}
#reset-overlay.open { display: flex; }
#reset-box {
  background: #2a2a2a; border-radius: 16px; /* slightly lighter than --color-bg-panel, intentional */
  padding: 28px 24px; max-width: 320px; width: 90%;
  font-family: var(--font); color: #fff;
}

/* Tip button (info screen) */
#tip-btn { display: inline-flex; align-items: center; gap: 6px; text-decoration: none !important; font-family: var(--font); font-size: clamp(13px, 3.5vw, 15px); padding: 10px 24px; border-radius: 999px; cursor: pointer; background: var(--color-green); color: #fff; transition: background 0.15s; letter-spacing: 0.01em; }
#tip-btn:active { background: var(--color-green-dark); }

/* Welcome overlay */
#welcome-overlay {
  background: var(--color-parchment); color: #111; font-family: var(--font);
  overflow-y: auto; -webkit-overflow-scrolling: touch;
  padding: calc(var(--safe-top) + 8px) 24px calc(var(--safe-bot) + 68px);
  background-image: radial-gradient(ellipse at center, transparent 30%, rgba(0,0,0,0.10) 100%);
  display: none; position: fixed; inset: 0; z-index: 190;
  flex-direction: column; align-items: center;
}
#welcome-overlay.open { display: flex; }
/* Corner buttons appear over welcome — shift to dark theme */
body:has(#welcome-overlay.open) #info-btn,
body:has(#welcome-overlay.open) #settings-btn { color: rgba(0,0,0,0.35); }
body:has(#welcome-overlay.open) #info-btn:active,
body:has(#welcome-overlay.open) #settings-btn:active { color: rgba(0,0,0,0.75); }
#welcome-content,
.welcome-content-shape {
  display: flex; flex-direction: column; gap: 18px; max-width: 600px; width: 100%;
  flex-grow: 1;
}
/* Tiny build-date footer at the bottom of Welcome / Hello — debug aid
   for verifying which build the home-screen-icon is actually running. */
.launch-build-date {
  text-align: center;
  font-size: 11px;
  font-family: 'Inconsolata', monospace;
  color: rgba(0, 0, 0, 0.45);
  margin-top: 6px;
}
.welcome-inline-btn {
  display: inline-flex; align-items: center;
  -webkit-appearance: none; background: none; border: none;
  color: rgba(0,0,0,0.55); cursor: pointer; font-family: inherit;
  font-size: inherit; vertical-align: middle; padding: 0 1px;
  line-height: 1;
}
.welcome-inline-btn:active { color: #000; }

/* Live voice-recognition transcript echo, anchored bottom-center, over Welcome and Settings (voice commands run under both) and under the corner buttons (250). */
#vc-transcript {
  position: fixed; left: 50%; bottom: calc(var(--safe-bot) + 8px);
  transform: translateX(-50%);
  font-family: var(--font); font-size: clamp(11px, 3vw, 14px);
  color: rgba(255,255,255,0.7);
  opacity: 0; transition: opacity 0.2s; pointer-events: none;
  z-index: 240;
}
#vc-transcript.visible { opacity: 1; }
