/* ——— App window side panels (About / Help) and launch screen ——— */

.otc-apppanel-scrim {
  position: absolute;
  inset: 0;
  z-index: 3;
  background: rgba(8, 12, 30, 0.38);
  backdrop-filter: blur(2px);
  opacity: 0;
  transition: opacity 0.22s ease;
}

.otc-apppanel {
  position: absolute;
  z-index: 4;
  top: 0;
  right: 0;
  bottom: 0;
  display: flex;
  flex-direction: column;
  width: min(460px, 100%);
  overflow: hidden;
  border-left: 1px solid rgba(148, 163, 255, 0.28);
  background:
    radial-gradient(ellipse 90% 40% at 100% 0%, rgba(34, 211, 238, 0.18) 0%, transparent 60%),
    radial-gradient(ellipse 80% 40% at 0% 0%, rgba(91, 75, 255, 0.3) 0%, transparent 60%),
    linear-gradient(180deg, #111a3a 0%, #0b1026 100%);
  color: #e8edff;
  box-shadow: -24px 0 60px rgba(3, 6, 20, 0.45);
  transform: translateX(24px);
  opacity: 0;
  transition: transform 0.28s cubic-bezier(0.2, 0.9, 0.3, 1), opacity 0.22s ease;
}

.otc-apppanel[hidden],
.otc-apppanel-scrim[hidden] { display: none; }

.otc-appwin.has-panel .otc-apppanel { transform: none; opacity: 1; }
.otc-appwin.has-panel .otc-apppanel-scrim { opacity: 1; }

.otc-apppanel__head {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 12px;
  padding: 22px 22px 16px;
  border-bottom: 1px solid rgba(148, 163, 255, 0.16);
}

.otc-apppanel__eyebrow {
  margin: 0 0 4px;
  color: #67e8f9;
  font-size: 11.5px;
  font-weight: 800;
  letter-spacing: 0.12em;
  text-transform: uppercase;
}

.otc-apppanel__title {
  margin: 0;
  color: #fff;
  font-size: 1.25rem;
  line-height: 1.3;
}

.otc-apppanel__close {
  display: grid;
  place-items: center;
  flex-shrink: 0;
  width: 36px;
  height: 36px;
  border-radius: 12px;
  border: 1px solid rgba(148, 163, 255, 0.25);
  background: rgba(255, 255, 255, 0.06);
  color: #e0e7ff;
  cursor: pointer;
  transition: background 0.18s ease, transform 0.18s ease;
}

.otc-apppanel__close:hover { background: rgba(255, 255, 255, 0.14); transform: rotate(90deg); }

.otc-apppanel__close:focus-visible,
.otc-apppanel__faq summary:focus-visible {
  outline: 3px solid #22d3ee;
  outline-offset: 2px;
}

.otc-apppanel__body {
  flex: 1;
  overflow-y: auto;
  padding: 18px 22px 26px;
  overscroll-behavior: contain;
}

.otc-apppanel__body a { color: #67e8f9; font-weight: 700; }

/* About */
.otc-apppanel__app {
  display: flex;
  align-items: center;
  gap: 14px;
  margin-bottom: 16px;
  padding: 14px;
  border-radius: 16px;
  background: rgba(255, 255, 255, 0.05);
  border: 1px solid rgba(148, 163, 255, 0.16);
}

.otc-apppanel__icon {
  display: grid;
  place-items: center;
  flex-shrink: 0;
  width: 56px;
  height: 56px;
  border-radius: 23%;
  overflow: hidden;
  background: #fff;
  font-size: 28px;
}

.otc-apppanel__icon img { width: 100%; height: 100%; object-fit: cover; }

.otc-apppanel__app-label {
  margin: 0 0 4px;
  color: #a5b4fc;
  font-size: 12px;
  font-weight: 800;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.otc-apppanel__tagline { margin: 0; color: #fff; font-weight: 600; line-height: 1.45; }

.otc-apppanel__text { margin: 0 0 12px; color: #c7d0f0; font-size: 14.5px; line-height: 1.65; }

.otc-apppanel__subhead {
  margin: 18px 0 10px;
  color: #fff;
  font-size: 13px;
  letter-spacing: 0.06em;
  text-transform: uppercase;
}

.otc-apppanel__list { list-style: none; margin: 0; padding: 0; display: grid; gap: 8px; }

.otc-apppanel__list li {
  position: relative;
  padding-left: 26px;
  color: #dbe2ff;
  font-size: 14px;
  line-height: 1.5;
}

.otc-apppanel__list li::before {
  content: "";
  position: absolute;
  left: 0;
  top: 3px;
  width: 16px;
  height: 16px;
  border-radius: 50%;
  background: linear-gradient(135deg, #22d3ee, #5b4bff);
  -webkit-mask: radial-gradient(circle, transparent 3px, #000 3.5px);
  mask: radial-gradient(circle, transparent 3px, #000 3.5px);
}

/* Help — FAQ accordion */
.otc-apppanel__faqs { display: grid; gap: 10px; }

.otc-apppanel__faq {
  border-radius: 16px;
  border: 1px solid rgba(148, 163, 255, 0.18);
  background: rgba(255, 255, 255, 0.04);
  transition: background 0.2s ease, border-color 0.2s ease;
}

.otc-apppanel__faq[open] {
  background: rgba(255, 255, 255, 0.07);
  border-color: rgba(103, 232, 249, 0.45);
}

.otc-apppanel__faq summary {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 14px 16px;
  border-radius: 16px;
  cursor: pointer;
  list-style: none;
}

.otc-apppanel__faq summary::-webkit-details-marker { display: none; }

.otc-apppanel__faq-num {
  flex-shrink: 0;
  color: #67e8f9;
  font: 800 12px/1 "Plus Jakarta Sans", Segoe UI, Arial, sans-serif;
}

.otc-apppanel__faq-q { flex: 1; color: #fff; font-weight: 700; font-size: 15px; line-height: 1.4; }

.otc-apppanel__faq-toggle {
  position: relative;
  flex-shrink: 0;
  width: 22px;
  height: 22px;
  border-radius: 50%;
  background: rgba(148, 163, 255, 0.16);
  transition: transform 0.25s ease, background 0.2s ease;
}

.otc-apppanel__faq-toggle::before,
.otc-apppanel__faq-toggle::after {
  content: "";
  position: absolute;
  left: 6px;
  right: 6px;
  top: 10px;
  height: 2px;
  border-radius: 2px;
  background: #e0e7ff;
}

.otc-apppanel__faq-toggle::after { transform: rotate(90deg); transition: transform 0.25s ease; }

.otc-apppanel__faq[open] .otc-apppanel__faq-toggle { background: #22d3ee; transform: rotate(180deg); }
.otc-apppanel__faq[open] .otc-apppanel__faq-toggle::before,
.otc-apppanel__faq[open] .otc-apppanel__faq-toggle::after { background: #0c1228; }
.otc-apppanel__faq[open] .otc-apppanel__faq-toggle::after { transform: rotate(0deg); }

.otc-apppanel__faq-a {
  padding: 0 16px 16px 40px;
  color: #c7d0f0;
  font-size: 14px;
  line-height: 1.65;
  animation: otc-apppanel-reveal 0.25s ease both;
}

.otc-apppanel__faq-a p { margin: 0 0 10px; }
.otc-apppanel__faq-a ol { margin: 0 0 10px; padding-left: 18px; display: grid; gap: 6px; }
.otc-apppanel__faq-a strong { color: #fff; }

@keyframes otc-apppanel-reveal {
  from { opacity: 0; transform: translateY(-4px); }
  to { opacity: 1; transform: none; }
}

/* Launch screen for apps that must open in their own tab */
.otc-appwin__launch {
  position: absolute;
  inset: 0;
  display: grid;
  place-items: center;
  padding: 24px;
  overflow: auto;
  background:
    radial-gradient(ellipse 60% 50% at 50% 0%, rgba(91, 75, 255, 0.14) 0%, transparent 70%),
    linear-gradient(180deg, #f8faff 0%, #eef2ff 100%);
}

.otc-appwin__launch-card {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 10px;
  max-width: 440px;
  text-align: center;
  animation: otc-appwin-rise 0.35s ease both;
}

.otc-appwin__launch-icon {
  display: grid;
  place-items: center;
  width: 96px;
  height: 96px;
  border-radius: 23%;
  overflow: hidden;
  background: #fff;
  font-size: 44px;
  box-shadow: 0 18px 40px rgba(40, 56, 140, 0.22);
}

.otc-appwin__launch-icon img { width: 100%; height: 100%; object-fit: cover; }

.otc-appwin__launch-label {
  margin: 8px 0 0;
  color: #4c46d4;
  font-size: 12px;
  font-weight: 800;
  letter-spacing: 0.1em;
  text-transform: uppercase;
}

.otc-appwin__launch-title { margin: 0; font-size: 1.5rem; color: #111827; }

.otc-appwin__launch-copy { margin: 0 0 8px; color: #4b5563; line-height: 1.55; }

.otc-appwin__launch-hint { margin: 4px 0 0; color: #6b7280; font-size: 13px; }

.otc-appwin__copylink {
  width: min(680px, 100%);
  max-width: 100%;
  min-width: 0;
}

.otc-appwin__pass--link {
  width: 100%;
  min-width: 0;
  box-sizing: border-box;
}

.otc-appwin__link-input {
  flex: 1 1 12rem;
  min-width: 0;
  max-width: 100%;
  height: auto;
  border: 0;
  resize: none;
  overflow: hidden;
  overflow-wrap: anywhere;
  background: transparent;
  color: #1e1b4b;
  font: 600 13px/1.45 ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
  field-sizing: content;
}

@media (max-width: 640px) {
  .otc-appwin__pass--link { flex-wrap: wrap; padding: 10px; }
  .otc-appwin__link-input { flex-basis: 100%; }
  .otc-appwin__pass--link .otc-appwin__pass-copy { flex: 1 1 auto; }
}

.otc-appwin__link-input:focus { outline: none; }

.otc-appwin__link-note {
  margin: 2px 0 0;
  padding: 8px 14px;
  border-radius: 12px;
  background: #eef2ff;
  color: #3730a3;
  font-size: 13px;
  font-weight: 700;
  line-height: 1.45;
}

.otc-appwin__link-faq {
  width: 100%;
  box-sizing: border-box;
  margin: 4px 0 0;
  padding: 12px 14px;
  border: 1px solid #e0e7ff;
  border-radius: 12px;
  background: #fff;
  text-align: left;
}

.otc-appwin__link-faq-q {
  margin: 0 0 4px;
  color: #1e1b4b;
  font-size: 13px;
  font-weight: 800;
}

.otc-appwin__link-faq-a {
  margin: 0;
  color: #3730a3;
  font-size: 13px;
  font-weight: 600;
  line-height: 1.5;
}

.otc-appwin__link-faq-a a { color: #312e81; font-weight: 800; }

.otc-appwin.is-copy .otc-appwin__status,
.otc-appwin.is-copy [data-appwin-newtab] { display: none; }

.otc-appwin.is-launch .otc-appwin__status,
.otc-appwin.is-launch .otc-appwin__note { display: none; }

/* Copy-first screen (password / coupon) */
.otc-appwin__pass {
  display: flex;
  align-items: center;
  gap: 10px;
  margin: 2px 0 10px;
  padding: 8px 8px 8px 20px;
  border: 2px dashed rgba(91, 75, 255, 0.55);
  border-radius: 16px;
  background: #fff;
  box-shadow: 0 10px 28px rgba(40, 56, 140, 0.12);
}

.otc-appwin__pass-value {
  font: 800 1.5rem/1.2 ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
  letter-spacing: 0.06em;
  color: #1e1b4b;
  user-select: all;
}

.otc-appwin__pass-copy {
  min-width: 96px;
  padding: 10px 16px;
  border: 1px solid rgba(91, 75, 255, 0.35);
  border-radius: 11px;
  background: #eef2ff;
  color: #4338ca;
  font: 800 14px/1 "Plus Jakarta Sans", Segoe UI, Arial, sans-serif;
  cursor: pointer;
  transition: background 0.15s ease, color 0.15s ease;
}

.otc-appwin__pass-copy:hover { background: #e0e7ff; }
.otc-appwin__pass-copy:focus-visible { outline: 3px solid #22d3ee; outline-offset: 2px; }
.otc-appwin__pass-copy.is-copied { background: #10b981; border-color: #10b981; color: #fff; }

@keyframes otc-appwin-rise {
  from { opacity: 0; transform: translateY(10px); }
  to { opacity: 1; transform: none; }
}


@media (prefers-reduced-motion: reduce) {
  .otc-apppanel,
  .otc-apppanel-scrim,
  .otc-apppanel__faq-toggle,
  .otc-apppanel__faq-toggle::after { transition: none; }
  .otc-apppanel__faq-a,
  .otc-appwin__launch-card { animation: none; }
}
