/* === Dynamic Area Manager Frontend Styles === */
@import url('https://fonts.googleapis.com/css2?family=Inter:wght@400;500;600&family=Poppins:wght@400;500;600&display=swap');

.dda-container {
  background: #fff;
  padding: 32px;
  border-radius: 14px;
  box-shadow: 0 4px 18px rgba(0, 0, 0, 0.08);
  margin: 30px auto;
  max-width: 1100px;
  font-family: "Poppins", "Inter", sans-serif;
  text-align: left;
  box-sizing: border-box;
  color: #111827;
}

/* --------------------
   Search Input
-------------------- */
.dda-container #dda-search {
  width: 100%;
  padding: 14px 16px;
  border: 1px solid #e5e7eb;
  border-radius: 10px;
  margin-bottom: 16px;
  font-size: 15px;
  background: #f9fafb;
  transition: border 0.2s ease, background 0.2s ease;
  color: #111827;
}
.dda-container #dda-search::placeholder { color: #9ca3af; }
.dda-container #dda-search:focus {
  border-color: #dc2626;
  background: #fff5f5;
  box-shadow: 0 0 0 3px rgba(220,38,38,0.2);
  outline: none;
}

/* --------------------
   Labels
-------------------- */
.dda-container label {
  font-weight: 600;
  margin-bottom: 6px;
  display: block;
  font-size: 14px;
  color: #374151;
  white-space: normal; /* ✅ wrap instead of truncate */
}

/* --------------------
   Select Boxes
-------------------- */
.dda-selects {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 20px;
  margin-bottom: 28px;
}

/* Tom Select controls */
.dda-container .ts-control {
  background-color: #fff;
  border: 1px solid #e5e7eb;
  border-radius: 8px;
  padding: 10px 12px;
  font-size: 15px;
  min-height: 44px;
  display: flex;
  align-items: center;
  cursor: pointer;
  transition: border 0.2s ease, background 0.2s ease;
}
.dda-container .ts-control .item,
.dda-container .ts-control .ts-placeholder {
  color: #374151;
  font-weight: 500;
}
.dda-container .ts-control.focus {
  border-color: #dc2626;
  background: #fff5f5;
  box-shadow: 0 0 0 2px rgba(220,38,38,0.2);
}

/* Dropdown */
.dda-container .ts-dropdown {
  background: #fff !important;
  border: 1px solid #e5e7eb;
  border-radius: 8px;
  box-shadow: 0 4px 12px rgba(0,0,0,0.12);
  margin-top: 4px;
  z-index: 9999;
  animation: fadeIn 0.2s ease;
}
@keyframes fadeIn {
  from { opacity: 0; transform: translateY(-4px); }
  to   { opacity: 1; transform: translateY(0); }
}
.dda-container .ts-dropdown .option {
  padding: 10px 12px;
  font-size: 15px;
  border-bottom: 1px solid #f0f0f0;
  transition: background-color 0.2s ease, color 0.2s ease;
}
.dda-container .ts-dropdown .option:last-child { border-bottom: none; }
.dda-container .ts-dropdown .option:hover {
  background-color: #fee2e2;
  color: #dc2626;
}
.dda-container .ts-dropdown .option.selected {
  background-color: #fecaca;
  font-weight: 600;
  color: #b91c1c;
}

/* --------------------
   Results Section
-------------------- */
.dda-container #dda-results {
  margin-top: 20px;
  padding: 10px;
}
.dda-container #dda-results h3 {
  font-size: 20px;
  font-weight: 600;
  margin: 20px 0 10px;
  color: #1e293b;
  padding: 12px 16px;
  border-radius: 10px;
  background: #fef2f2;
  border-left: 5px solid #dc2626;
  line-height: 1.4;
}
.dda-container #dda-results h4 {
  margin: 16px 0 10px;
  font-size: 15px;
  font-weight: 600;
  color: #991b1b;
  line-height: 1.3;
}

/* --------------------
   Area Cards Grid
-------------------- */
.dda-areas {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 16px;
  margin-bottom: 24px;
}
.dda-area {
  background: #fff;
  border: 1px solid #e5e7eb;
  border-radius: 12px;
  padding: 16px 18px;
  font-size: 14px;
  font-weight: 500;
  color: #111827;
  text-decoration: none;
  display: flex;
  align-items: center;
  gap: 10px;
  transition: all 0.25s ease;
  box-shadow: 0 2px 6px rgba(0,0,0,0.05);
}
.dda-area:hover,
.dda-area:focus-visible {
  background: #fee2e2;
  border-color: #dc2626;
  color: #991b1b;
  transform: scale(1.02) translateY(-2px);
  box-shadow: 0 6px 14px rgba(0,0,0,0.12);
  outline: none;
}

/* Pin icon */
.dda-area .pin {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 32px;
  height: 32px;
  border-radius: 50%;
  background: #fee2e2;
  color: #dc2626;
  font-size: 16px;
  flex-shrink: 0;
  transition: all 0.25s ease;
}
.dda-area:hover .pin,
.dda-area:focus-visible .pin {
  background: #dc2626;
  color: #fff;
  transform: scale(1.15);
}

/* --------------------
   Empty Message
-------------------- */
.dda-container p {
  color: #64748b;
  font-size: 15px;
  text-align: center;
  margin-top: 20px;
}

/* --------------------
   Responsive
-------------------- */
@media (max-width: 1024px) {
  .dda-areas { grid-template-columns: repeat(3, 1fr); }
}
@media (max-width: 768px) {
  .dda-selects { grid-template-columns: 1fr; }
  .dda-areas { grid-template-columns: repeat(2, 1fr); }
}
@media (max-width: 480px) {
  .dda-areas { grid-template-columns: 1fr; }
  .dda-container { padding: 20px; }
  #dda-results h3 { font-size: 18px; }
  #dda-results h4 { font-size: 14px; }
}
