/* ── Aikidojo Map Plugin Styles ─────────────────────────────────────────── */

#aikidojo-wrap {
  font-family: inherit;
  max-width: 100%;
}

/* Search bar */
#aikidojo-search-bar {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-bottom: 12px;
  align-items: center;
}

#aikidojo-search-bar input,
#aikidojo-search-bar select {
  padding: 8px 12px;
  border: 1px solid #ccc;
  border-radius: 4px;
  font-size: 14px;
  flex: 1 1 160px;
  min-width: 0;
}

#aikidojo-search-bar input:focus,
#aikidojo-search-bar select:focus {
  outline: none;
  border-color: #2c3e50;
  box-shadow: 0 0 0 2px rgba(44,62,80,.15);
}

#ad-search-btn,
#ad-search-reset {
  padding: 8px 18px;
  border: none;
  border-radius: 4px;
  cursor: pointer;
  font-size: 14px;
  font-weight: 600;
  transition: background .2s;
}

#ad-search-btn {
  background: #2c3e50;
  color: #fff;
}
#ad-search-btn:hover { background: #1a252f; }

#ad-search-reset {
  background: #ecf0f1;
  color: #555;
}
#ad-search-reset:hover { background: #dde1e3; }

/* Map */
#aikidojo-map {
  width: 100%;
  height: 520px;
  border-radius: 6px;
  border: 1px solid #ddd;
  margin-bottom: 20px;
  z-index: 0;
}

/* Legend */
.ad-legend {
  background: rgba(255,255,255,.92);
  padding: 10px 14px;
  border-radius: 6px;
  font-size: 12px;
  line-height: 1.8;
  box-shadow: 0 1px 4px rgba(0,0,0,.2);
  max-width: 180px;
}
.ad-legend strong { display: block; margin-bottom: 4px; font-size: 13px; }
.ad-legend-dot {
  display: inline-block;
  width: 10px; height: 10px;
  border-radius: 50%;
  margin-right: 6px;
  vertical-align: middle;
}

/* Popup */
.ad-popup { font-size: 13px; line-height: 1.6; min-width: 180px; }
.ad-popup-title { font-size: 15px; font-weight: 700; margin-bottom: 4px; }
.ad-popup-style { font-size: 12px; font-weight: 600; margin-bottom: 6px; }
.ad-popup-notes {
  margin-top: 8px;
  padding-top: 8px;
  border-top: 1px solid #eee;
  font-size: 12px;
  color: #555;
}

/* Results table */
#aikidojo-results { margin-top: 10px; }

#aikidojo-results-count {
  font-size: 13px;
  color: #666;
  margin-bottom: 8px;
}

#aikidojo-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 14px;
}

#aikidojo-table th {
  background: #2c3e50;
  color: #fff;
  padding: 9px 12px;
  text-align: left;
  font-weight: 600;
}

#aikidojo-table td {
  padding: 8px 12px;
  border-bottom: 1px solid #eee;
}

.ad-row { cursor: pointer; transition: background .15s; }
.ad-row:hover    { background: #f0f4f8; }
.ad-row-active   { background: #ddeeff !important; }

/* Form styles */
.aikidojo-form-wrap {
  max-width: 700px;
  margin: 0 auto;
}

.aikidojo-form-wrap h3 {
  margin-bottom: 6px;
}

.aikidojo-form {
  background: #f9f9f9;
  border: 1px solid #ddd;
  border-radius: 6px;
  padding: 24px;
  margin-top: 16px;
}

.aikidojo-field-row {
  display: flex;
  gap: 16px;
  flex-wrap: wrap;
}

.aikidojo-field {
  flex: 1 1 260px;
  margin-bottom: 16px;
  display: flex;
  flex-direction: column;
}

.aikidojo-field label {
  font-size: 13px;
  font-weight: 600;
  color: #333;
  margin-bottom: 5px;
}

.aikidojo-field label small {
  font-weight: 400;
  color: #777;
}

.aikidojo-field input,
.aikidojo-field select,
.aikidojo-field textarea {
  padding: 9px 12px;
  border: 1px solid #ccc;
  border-radius: 4px;
  font-size: 14px;
  font-family: inherit;
  background: #fff;
  transition: border-color .2s;
}

.aikidojo-field input:focus,
.aikidojo-field select:focus,
.aikidojo-field textarea:focus {
  outline: none;
  border-color: #2c3e50;
  box-shadow: 0 0 0 2px rgba(44,62,80,.12);
}

.aikidojo-field textarea { resize: vertical; min-height: 100px; }

.aikidojo-btn {
  display: inline-block;
  padding: 11px 28px;
  background: #2c3e50;
  color: #fff;
  border: none;
  border-radius: 4px;
  font-size: 15px;
  font-weight: 600;
  cursor: pointer;
  margin-top: 8px;
  transition: background .2s;
}
.aikidojo-btn:hover { background: #1a252f; }

.aikidojo-recover-link {
  margin-top: 16px;
  font-size: 13px;
  color: #666;
}

/* Messages */
.aikidojo-success {
  background: #edfdf0;
  border: 1px solid #2ecc71;
  color: #1a6e35;
  border-radius: 5px;
  padding: 14px 18px;
  margin: 12px 0;
}

.aikidojo-error {
  background: #fdf0f0;
  border: 1px solid #e74c3c;
  color: #7b1f1f;
  border-radius: 5px;
  padding: 10px 14px;
  margin: 10px 0;
}

/* Flash overlay message */
.aikidojo-flash {
  position: fixed;
  bottom: 30px;
  left: 50%;
  transform: translateX(-50%);
  padding: 14px 28px;
  border-radius: 6px;
  font-size: 15px;
  font-weight: 600;
  z-index: 9999;
  box-shadow: 0 4px 16px rgba(0,0,0,.18);
  animation: adFadeIn .3s ease;
}

@keyframes adFadeIn {
  from { opacity: 0; transform: translateX(-50%) translateY(10px); }
  to   { opacity: 1; transform: translateX(-50%) translateY(0); }
}

/* Autocomplete style suggestions */
.aikidojo-field {
  position: relative;
}

.ad-autocomplete-list {
  position: absolute;
  top: 100%;
  left: 0;
  right: 0;
  background: #fff;
  border: 1px solid #ccc;
  border-top: none;
  border-radius: 0 0 4px 4px;
  box-shadow: 0 4px 12px rgba(0,0,0,.12);
  z-index: 1000;
  max-height: 220px;
  overflow-y: auto;
}

.ad-autocomplete-item {
  padding: 9px 12px;
  cursor: pointer;
  font-size: 14px;
  border-bottom: 1px solid #f0f0f0;
  transition: background .1s;
}

.ad-autocomplete-item:last-child { border-bottom: none; }
.ad-autocomplete-item:hover { background: #f0f4f8; }

/* Responsive */
@media (max-width: 600px) {
  #aikidojo-map { height: 340px; }
  #aikidojo-search-bar input,
  #aikidojo-search-bar select { flex: 1 1 100%; }
  .aikidojo-field { flex: 1 1 100%; }
  #aikidojo-table th:nth-child(3),
  #aikidojo-table td:nth-child(3) { display: none; }
}
