/* Degrees Minutes Seconds Calculator — page-specific styles.
   Three stacked notation panels, compact enough that all three are visible
   on a 375px viewport. Mobile-first; uses design-system custom properties. */

.notation-panel {
  border: 1px solid var(--color-border);
  border-radius: var(--radius-lg);
  padding: 0.75rem;
  margin-bottom: 0.75rem;
  background: var(--color-white);
}

.notation-panel-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.5rem;
  margin-bottom: 0.5rem;
}

.notation-panel-head label,
.notation-panel-head .notation-label {
  font-weight: 600;
  font-size: 0.875rem;
  color: var(--color-text);
}

.notation-fields {
  display: flex;
  align-items: flex-end;
  gap: 0.5rem;
  flex-wrap: nowrap;
}

.notation-fields .form-group {
  margin-bottom: 0;
  flex: 1 1 0;
  min-width: 0;
}

.notation-fields .form-group label {
  font-size: 0.75rem;
  color: var(--color-text-light);
  margin-bottom: 0.25rem;
  display: block;
}

.notation-fields input {
  width: 100%;
  min-height: 44px;
  font-size: 16px; /* prevents iOS zoom-on-focus */
}

.notation-fields .sign-toggle {
  flex: 0 0 auto;
}

.sign-toggle .pill {
  min-width: 44px;
  min-height: 44px;
  padding: 0.25rem 0.6rem;
  font-size: 1.05rem;
  line-height: 1;
}

.notation-fields select {
  min-height: 44px;
  font-size: 16px;
}

.panel-clear {
  background: none;
  border: none;
  color: var(--color-text-muted);
  font-size: 1rem;
  line-height: 1;
  cursor: pointer;
  padding: 0.35rem 0.5rem;
  min-width: 32px;
  min-height: 32px;
  border-radius: var(--radius-sm);
}

.panel-clear:hover { color: var(--color-error); background: var(--color-border-light); }

.notation-panel .btn-copy {
  min-width: 44px;
  min-height: 32px;
}

.coord-row {
  border: 1px solid var(--color-border);
  border-radius: var(--radius-lg);
  padding: 0.75rem;
  margin-bottom: 1rem;
  background: var(--color-white);
}

.coord-row > h3 {
  font-size: 0.95rem;
  margin: 0 0 0.5rem;
}

.coord-row .notation-panel {
  border: none;
  padding: 0 0 0.5rem;
  margin-bottom: 0.25rem;
  border-bottom: 1px dashed var(--color-border-light);
}

.coord-row .notation-panel:last-of-type { border-bottom: none; padding-bottom: 0; }

.dms-controls {
  display: flex;
  flex-wrap: wrap;
  gap: 1rem;
  align-items: flex-end;
  margin: 1rem 0 0.5rem;
  padding-top: 1rem;
  border-top: 1px solid var(--color-border-light);
}

.dms-controls .form-group { margin-bottom: 0; flex: 1 1 160px; }

.dms-controls select { min-height: 44px; font-size: 16px; width: 100%; }

.inline-note {
  display: block;
  font-size: 0.78rem;
  color: var(--color-text-light);
  margin-top: 0.3rem;
}

.notation-msg {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  flex-wrap: wrap;
  margin-top: 0.5rem;
  padding: 0.5rem 0.75rem;
  border-radius: var(--radius);
  background: #fef2f2;
  border: 1px solid #fecaca;
  color: #b91c1c;
  font-size: 0.85rem;
}

.notation-msg .btn { min-height: 36px; padding: 0.25rem 0.75rem; font-size: 0.8rem; }

.arith-grid {
  display: flex;
  flex-direction: column;
  gap: 0.75rem;
}

.arith-operand {
  display: flex;
  align-items: flex-end;
  gap: 0.5rem;
}

.arith-operand .form-group { flex: 1 1 0; margin-bottom: 0; min-width: 0; }
.arith-operand input { width: 100%; min-height: 44px; font-size: 16px; }

.arith-op-select {
  max-width: 120px;
}

.arith-op-select select { min-height: 44px; font-size: 16px; width: 100%; }

#arith-lines {
  width: 100%;
  min-height: 8rem;
  border: 1px solid var(--color-border);
  border-radius: var(--radius);
  padding: 0.6rem 0.75rem;
  font-family: var(--font-mono);
  font-size: 16px;
  resize: vertical;
}

#arith-lines:focus {
  outline: none;
  border-color: var(--color-primary);
  box-shadow: 0 0 0 3px rgb(245 73 0 / 0.12);
}

@media (min-width: 640px) {
  .arith-grid { flex-direction: row; align-items: flex-end; }
  .arith-grid .arith-operand { flex: 1 1 0; }
}
