/* direction-addon.css */
/* Direction field + direction badge styling */

#directionSelectInput {
  width: 100%;
  border: 1px solid rgba(148, 163, 184, 0.25);
  background: rgba(15, 23, 42, 0.92);
  color: #f8fafc;
  border-radius: 12px;
  padding: 12px 14px;
  font-size: 0.95rem;
  line-height: 1.2;
  appearance: none;
  -webkit-appearance: none;
  -moz-appearance: none;
  outline: none;
  transition: border-color 0.15s ease, box-shadow 0.15s ease, background 0.15s ease;
  background-image:
    linear-gradient(45deg, transparent 50%, #cbd5e1 50%),
    linear-gradient(135deg, #cbd5e1 50%, transparent 50%);
  background-position:
    calc(100% - 18px) calc(50% - 2px),
    calc(100% - 12px) calc(50% - 2px);
  background-size: 6px 6px, 6px 6px;
  background-repeat: no-repeat;
  padding-right: 40px;
}

#directionSelectInput:focus {
  border-color: rgba(247, 209, 6, 0.55);
  box-shadow: 0 0 0 3px rgba(247, 209, 6, 0.12);
}

#directionSelectInput option {
  background: #0f172a;
  color: #f8fafc;
}

.ut-direction-badge {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 28px;
  height: 24px;
  padding: 0 9px;
  border-radius: 999px;
  background: rgba(59, 130, 246, 0.16);
  border: 1px solid rgba(59, 130, 246, 0.26);
  color: #bfdbfe;
  font-size: 0.72rem;
  font-weight: 800;
  line-height: 1;
  letter-spacing: 0.02em;
  white-space: nowrap;
}

.ut-direction-badge[data-dir="N"] {
  background: rgba(34, 197, 94, 0.14);
  border-color: rgba(34, 197, 94, 0.26);
  color: #bbf7d0;
}

.ut-direction-badge[data-dir="E"] {
  background: rgba(59, 130, 246, 0.16);
  border-color: rgba(59, 130, 246, 0.26);
  color: #bfdbfe;
}

.ut-direction-badge[data-dir="S"] {
  background: rgba(249, 115, 22, 0.16);
  border-color: rgba(249, 115, 22, 0.26);
  color: #fed7aa;
}

.ut-direction-badge[data-dir="W"] {
  background: rgba(168, 85, 247, 0.16);
  border-color: rgba(168, 85, 247, 0.26);
  color: #ddd6fe;
}

.ut-meta-badges {
  display: inline-flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 6px;
}

.ut-direction-badge.is-compact {
  min-width: 24px;
  height: 20px;
  padding: 0 7px;
  font-size: 0.68rem;
}

/* Full-word overlay on image preview */
.ut-direction-overlay {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 72px;
  max-width: calc(100% - 20px);
  min-height: 30px;
  padding: 6px 12px;
  border-radius: 999px;
  background: rgba(15, 23, 42, 0.82);
  border: 1px solid rgba(255, 255, 255, 0.14);
  color: #f8fafc;
  font-size: 0.82rem;
  font-weight: 800;
  line-height: 1;
  white-space: nowrap;
  backdrop-filter: blur(4px);
  box-shadow: 0 8px 20px rgba(0, 0, 0, 0.24);
}

@media (max-width: 560px) {
  #directionSelectInput {
    font-size: 0.9rem;
    padding: 11px 12px;
    padding-right: 38px;
  }

  .ut-direction-badge {
    min-width: 26px;
    height: 22px;
    padding: 0 8px;
    font-size: 0.7rem;
  }

  .ut-direction-overlay {
    min-width: 64px;
    min-height: 28px;
    padding: 5px 10px;
    font-size: 0.74rem;
  }
}