/* Shared components used on several screens: buttons, chips, tab bar, toast, quick-exit. */

.tabs {
  transition:
    background-color 0.25s,
    color 0.25s;
  display: flex;
  gap: 2px;
  margin: 0 12px calc(10px + env(safe-area-inset-bottom, 0px));
  padding: 6px;
  background: var(--surface);
  box-shadow: var(--shadow);
  border-radius: 22px;
  overflow: visible;
  align-items: flex-end;
}

.iconbtn {
  width: 42px;
  height: 42px;
  border-radius: 50%;
  border: none;
  background: var(--surface);
  box-shadow: var(--shadow);
  display: grid;
  place-items: center;
}

.btn {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  width: 100%;
  border-radius: 999px;
  padding: 15px;
  font-size: 15.5px;
  font-weight: 500;
  border: 1.5px solid var(--line);
  background: var(--surface);
  min-height: 52px;
  border-color: transparent;
}

.btn.primary {
  box-shadow: var(--shadow);
  background: var(--primary);
  color: var(--on-primary);
  border-color: transparent;
}

.toast {
  position: absolute;
  left: 50%;
  bottom: calc(100px + env(safe-area-inset-bottom, 0px));
  transform: translateX(-50%);
  background: var(--ink);
  color: var(--ground);
  padding: 10px 18px;
  border-radius: 999px;
  font-size: 13px;
  z-index: 20;
  max-width: 85%;
  text-align: center;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.2s;
}

.toast.show {
  opacity: 1;
}

.note {
  font-size: 12.5px;
  display: flex;
  gap: 6px;
  align-items: flex-start;
  color: var(--ink-soft);
}

.fine {
  font-size: 12.5px;
  color: var(--ink-soft);
}

.tabs button {
  background: none;
  border: none;
  color: var(--ink-soft);
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 2px;
  font-size: 11.5px;
  padding: 8px 2px;
  flex: 1;
  min-width: 0;
  min-height: 52px;
  border-radius: 16px;
}

.tabs button svg {
  width: 22px;
  height: 22px;
}

.tabs button.on {
  font-weight: 600;
  background: var(--accent);
  color: #18214a;
}

.tabs button.sos {
  flex: 0 0 66px;
  width: 66px;
  height: 66px;
  min-height: 66px;
  margin: -28px 4px 0;
  padding: 0;
  border-radius: 50%;
  background: var(--accent);
  color: #18214a;
  border: 5px solid var(--ground);
  box-shadow: 0 10px 20px -8px rgba(24, 33, 74, 0.6);
  justify-content: center;
  gap: 0;
  font-size: 10.5px;
  font-weight: 700;
}

.dots {
  display: flex;
  gap: 6px;
  justify-content: center;
}

.dots i {
  width: 7px;
  height: 7px;
  border-radius: 4px;
  background: var(--line);
}

.dots i.on {
  width: 22px;
  background: var(--accent);
}

.stack {
  display: flex;
  flex-direction: column;
  gap: 10px;
  width: 100%;
  margin-top: 6px;
}

.acts {
  display: flex;
  gap: 6px;
  margin-top: 10px;
  flex-wrap: wrap;
}

.chip {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-size: 13px;
  border-radius: 999px;
  padding: 9px 14px;
  min-height: 40px;
  border: 1.5px solid var(--line);
  background: var(--surface);
  border-color: var(--line);
}

.chip.fill {
  background: var(--primary);
  color: var(--on-primary);
  border-color: var(--primary);
}

.typing-dots {
  display: inline-flex;
  gap: 4px;
  padding: 4px 2px;
}

.typing-dots i {
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: var(--ink-soft);
  animation: blink 1s infinite;
}

.typing-dots i:nth-child(2) {
  animation-delay: 0.15s;
}

.typing-dots i:nth-child(3) {
  animation-delay: 0.3s;
}

.badge {
  display: inline-block;
  font-size: 11.5px;
  border-radius: 999px;
  padding: 1px 10px;
  background: var(--primary-soft);
  margin-top: 5px;
  color: var(--ink);
}

.avail {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  font-size: 12px;
  color: #1e7a45;
}

.avail i {
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: #2e9e5b;
}

.avail.busy {
  color: var(--ink-soft);
}

.avail.busy i {
  background: var(--ink-soft);
}

.tabs button.sos.on {
  flex: 0 0 66px;
  width: 66px;
  height: 66px;
  min-height: 66px;
  margin: -28px 4px 0;
  padding: 0;
  border-radius: 50%;
  background: var(--accent);
  color: #18214a;
  border: 5px solid var(--ground);
  box-shadow: 0 10px 20px -8px rgba(24, 33, 74, 0.6);
  justify-content: center;
  gap: 0;
  font-size: 10.5px;
  font-weight: 700;
  outline: 3px solid var(--primary);
  outline-offset: 0;
}

.qx {
  position: absolute;
  left: 14px;
  bottom: calc(100px + env(safe-area-inset-bottom, 0px));
  z-index: 15;
  display: inline-flex;
  align-items: center;
  gap: 6px;
  min-height: 40px;
  padding: 0 14px 0 12px;
  border-radius: 999px;
  border: none;
  background: var(--primary);
  color: var(--on-primary);
  font-size: 12.5px;
  font-weight: 600;
  box-shadow: 0 10px 22px -8px rgba(24, 33, 74, 0.6);
}

.qx svg {
  color: var(--accent);
}

.app[data-cur="chat"] .qx {
  display: none;
}

.iconbtn.xbtn {
  background: var(--primary);
  color: var(--accent);
}

.app[data-cur="welcome"] .qx,
.app[data-cur="country"] .qx,
.app[data-cur="disguise"] .qx {
  display: none;
}

.tabs button.sos svg {
  width: 24px;
  height: 24px;
}

@keyframes blink {
  0%,
  100% {
    opacity: 0.25;
  }
  50% {
    opacity: 1;
  }
}

.badge-flat {
  margin: 0;
}
