/* Shared by the web map and the home page: the "Get the full Drone Map
 * app" sheet, its dialog, and the tokens and small pieces both use. */

:root {
  --dm-brand: #0e92a0;
  --dm-brand-deep: #0b6f7a;
  --dm-clear: #34c759;
  --dm-caution: #ff9500;
  --dm-nofly: #ff3b30;
  --dm-panel-w: 400px;
  --dm-radius: 20px;
  --dm-float: rgba(255, 255, 255, 0.9);
  --dm-float-line: rgba(15, 23, 42, 0.08);
  --dm-muted-surface: #f1f4f8;
}

@media (prefers-color-scheme: dark) {
  :root {
    --dm-brand: #2fb3c1;
    --dm-brand-deep: #7fd6df;
    --dm-float: rgba(17, 24, 39, 0.88);
    --dm-float-line: rgba(148, 163, 184, 0.2);
    --dm-muted-surface: #1a2232;
  }
}

.dm-icon-btn {
  display: grid;
  place-items: center;
  width: 34px;
  height: 34px;
  flex-shrink: 0;
  border: 0;
  border-radius: 50%;
  background: var(--dm-muted-surface);
  color: var(--ink);
  cursor: pointer;
}

.dm-icon-btn .dm-icon {
  width: 16px;
  height: 16px;
}

.dm-fine {
  margin: 0;
  color: var(--muted);
  font-size: 12.5px;
  line-height: 1.5;
  opacity: 0.9;
}

.dm-well {
  display: grid;
  place-items: center;
  width: 36px;
  height: 36px;
  flex-shrink: 0;
  border-radius: 11px;
  color: var(--tint, var(--dm-brand));
  background: color-mix(in srgb, var(--tint, var(--dm-brand)) 14%, transparent);
}

.dm-well .dm-icon {
  width: 19px;
  height: 19px;
}

.dm-store-row {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.dm-store-row .btn .dm-icon {
  width: 1.15em;
  height: 1.15em;
}

/* ─────────────────────────────── Dialog */

.dm-dialog {
  width: min(440px, calc(100% - 32px));
  max-height: calc(100dvh - 32px);
  padding: 0;
  border: 0;
  border-radius: 24px;
  background: var(--surface-elevated);
  color: var(--ink);
  box-shadow: 0 24px 64px rgba(0, 0, 0, 0.3);
}

.dm-dialog::backdrop {
  background: rgba(2, 6, 23, 0.5);
  -webkit-backdrop-filter: blur(3px);
  backdrop-filter: blur(3px);
}

.dm-dialog[open] {
  animation: dm-pop 0.28s cubic-bezier(0.34, 1.56, 0.64, 1);
}

@keyframes dm-pop {
  from { opacity: 0; transform: scale(0.94); }
}

.dm-dialog-body {
  position: relative;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 14px;
  padding: 28px 24px 24px;
  text-align: center;
}

.dm-dialog-close {
  position: absolute;
  top: 14px;
  right: 14px;
}

.dm-dialog-icon {
  width: 72px;
  height: 72px;
  border-radius: 22.5%;
  box-shadow: 0 4px 16px rgba(15, 23, 42, 0.18);
}

.dm-dialog h2 {
  margin: 0;
  font-size: 22px;
  line-height: 1.25;
  letter-spacing: -0.01em;
}

.dm-dialog-lead {
  margin: -4px 0 0;
  color: var(--muted);
  font-size: 15px;
  line-height: 1.55;
}

.dm-feature-list {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 10px;
  width: 100%;
  margin: 4px 0;
  padding: 0;
  list-style: none;
  text-align: left;
}

.dm-feature-list li {
  display: flex;
  gap: 8px;
  align-items: flex-start;
}

.dm-feature-list .dm-well {
  width: 30px;
  height: 30px;
  border-radius: 9px;
}

.dm-feature-list .dm-well .dm-icon {
  width: 16px;
  height: 16px;
}

.dm-feature-list strong {
  display: block;
  font-size: 13.5px;
  line-height: 1.25;
}

.dm-feature-list small {
  display: block;
  font-size: 12px;
  color: var(--muted);
  line-height: 1.3;
}

.dm-dialog .dm-store-row {
  justify-content: center;
}

.dm-divider {
  display: flex;
  align-items: center;
  gap: 12px;
  width: 100%;
  color: var(--muted);
  font-size: 13px;
  font-weight: 650;
}

.dm-divider::before,
.dm-divider::after {
  content: "";
  flex: 1;
  height: 1px;
  background: var(--line);
}

.dm-code-form {
  display: flex;
  flex-direction: column;
  gap: 8px;
  width: 100%;
}

.dm-code-label {
  font-weight: 700;
  font-size: 15px;
}

.dm-code-row {
  display: flex;
  gap: 8px;
}

.dm-code-input {
  flex: 1;
  min-width: 0;
  height: 48px;
  padding: 0 14px;
  border: 1px solid var(--line);
  border-radius: 14px;
  background: var(--surface);
  color: var(--ink);
  font: 700 22px/1 ui-monospace, SFMono-Regular, Menlo, monospace;
  letter-spacing: 0.3em;
  text-align: center;
}

.dm-code-input:focus {
  outline: 2px solid var(--dm-brand);
  outline-offset: 1px;
}

.dm-code-error {
  min-height: 1.2em;
  margin: 0;
  color: var(--dm-nofly);
  font-size: 13.5px;
  font-weight: 600;
}

.dm-code-error:empty {
  min-height: 0;
}

.dm-svg {
  display: inline-flex;
  width: 1.15em;
  height: 1.15em;
  flex-shrink: 0;
}

.dm-svg svg {
  width: 100%;
  height: 100%;
}

.dm-well .dm-svg {
  width: 17px;
  height: 17px;
}

.dm-icon-btn .dm-svg {
  width: 16px;
  height: 16px;
}

.dm-dialog [hidden] {
  display: none !important;
}

button.btn {
  border: 0;
  font-family: inherit;
  cursor: pointer;
}
