/* ── Travel Diary WordPress Plugin Styles ─────────────────────────────── */

/* ── Reset binnen de plugin ────────────────────────────────────────────── */
.td-collections-wrap *,
.td-collection-wrap * {
  box-sizing: border-box;
}

/* ── Error / empty ─────────────────────────────────────────────────────── */
.td-error {
  background: #fcebeb;
  color: #a32d2d;
  border: 1px solid #f5c0c0;
  border-radius: 10px;
  padding: 14px 18px;
  font-size: 14px;
  margin: 16px 0;
}
.td-empty {
  text-align: center;
  padding: 48px 24px;
  color: #888780;
}
.td-empty p { font-size: 15px; margin-top: 12px; }

/* ── Collecties grid ────────────────────────────────────────────────────── */
.td-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
  gap: 16px;
  margin: 0;
  padding: 0;
  list-style: none;
}

.td-card {
  background: #fff;
  border-radius: 14px;
  overflow: hidden;
  border: 1px solid #e0ddd5;
  text-decoration: none !important;
  color: inherit !important;
  display: block;
  transition: box-shadow .15s, transform .15s;
}
.td-card:hover {
  box-shadow: 0 8px 24px rgba(0,0,0,0.10);
  transform: translateY(-2px);
}
.td-card-cover {
  height: 140px;
  background: #E6F1FB;
  display: flex;
  align-items: center;
  justify-content: center;
  overflow: hidden;
}
.td-card-cover img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}
.td-card-emoji { font-size: 48px; line-height: 1; }
.td-card-body { padding: 14px 16px; }
.td-card-title { font-size: 15px; font-weight: 600; margin-bottom: 4px; color: #2c2c2a; }
.td-card-desc { font-size: 12px; color: #5f5e5a; margin-bottom: 6px; line-height: 1.4; }

/* ── Meta items ─────────────────────────────────────────────────────────── */
.td-card-meta,
.td-hero-meta {
  display: flex;
  gap: 12px;
  flex-wrap: wrap;
}
.td-meta-item {
  display: flex;
  align-items: center;
  gap: 4px;
  font-size: 12px;
  color: #888780;
}
.td-hero-meta .td-meta-item {
  font-size: 13px;
  color: #185FA5;
  font-weight: 500;
}
.td-meta-date { margin-left: auto; }

/* ── Hero ────────────────────────────────────────────────────────────────── */
.td-hero {
  background: #E6F1FB;
  border-radius: 12px;
  padding: 24px;
  margin-bottom: 24px;
}
.td-hero-title {
  font-size: 24px !important;
  font-weight: 700 !important;
  margin: 0 0 8px !important;
  display: flex;
  align-items: center;
  gap: 10px;
  color: #2c2c2a;
  border: none !important;
  padding: 0 !important;
}
.td-hero-desc {
  font-size: 15px;
  color: #185FA5;
  margin-bottom: 12px;
  line-height: 1.6;
}

/* ── Twee-kolom layout ─────────────────────────────────────────────────── */
.td-content-layout {
  display: flex;
  gap: 24px;
  align-items: flex-start;
}
.td-map-col {
  flex: 0 0 460px;
  position: sticky;
  top: 80px;
  max-height: calc(100vh - 100px);
}
.td-map {
  height: 500px;
  width: 100%;
  border-radius: 12px;
  overflow: hidden;
  border: 1px solid #e0ddd5;
  z-index: 1;
}
.td-list-col {
  flex: 1;
  min-width: 0;
}
@media (max-width: 860px) {
  .td-content-layout { flex-direction: column; }
  .td-map-col { position: static; flex: none; width: 100%; max-height: none; }
  .td-map { height: 300px; border-radius: 8px; }
}

/* ── Collectie notes ────────────────────────────────────────────────────── */
.td-notes {
  background: #fff;
  border-radius: 10px;
  border: 1px solid #e0ddd5;
  padding: 14px 16px;
  font-size: 14px;
  color: #444441;
  line-height: 1.7;
  margin-bottom: 16px;
}

/* ── Sectie titel ────────────────────────────────────────────────────────── */
.td-section-title {
  font-size: 14px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: .5px;
  color: #888780;
  margin-bottom: 12px;
  padding-bottom: 8px;
  border-bottom: 1px solid #e0ddd5;
}

/* ── Locatie kaarten ─────────────────────────────────────────────────────── */
.td-location-list {
  display: flex;
  flex-direction: column;
  gap: 12px;
  margin-bottom: 32px;
}
.td-loc-card {
  background: #fff;
  border-radius: 12px;
  border: 1px solid #e0ddd5;
  padding: 16px;
  display: flex;
  gap: 14px;
  align-items: flex-start;
}
.td-loc-num {
  width: 28px;
  height: 28px;
  min-width: 28px;
  border-radius: 50%;
  background: #185FA5;
  color: #fff;
  font-size: 12px;
  font-weight: 700;
  display: flex;
  align-items: center;
  justify-content: center;
  margin-top: 2px;
}
.td-loc-body { flex: 1; min-width: 0; }
.td-loc-name { font-size: 15px; font-weight: 600; margin-bottom: 2px; color: #2c2c2a; }
.td-loc-addr { font-size: 12px; color: #888780; margin-bottom: 6px; }
.td-loc-rating { color: #EF9F27; font-size: 14px; margin-bottom: 6px; }

.td-loc-cats {
  display: flex;
  gap: 6px;
  flex-wrap: wrap;
  margin-bottom: 8px;
}
.td-cat-badge {
  display: inline-flex;
  align-items: center;
  padding: 3px 9px;
  border-radius: 12px;
  font-size: 11px;
  font-weight: 600;
}

.td-loc-detail {
  display: flex;
  align-items: center;
  gap: 6px;
  margin-bottom: 4px;
  font-size: 12px;
  color: #444441;
  flex-wrap: wrap;
}
.td-detail-label { color: #888780; min-width: 90px; }

.td-pill {
  display: inline-flex;
  align-items: center;
  gap: 3px;
  background: #f5f4f0;
  border-radius: 6px;
  padding: 3px 8px;
  font-size: 11px;
  color: #444441;
}
.td-mono { font-family: monospace; color: #888780; }

.td-loc-notes {
  font-size: 13px;
  color: #444441;
  line-height: 1.6;
  margin-top: 8px;
  padding: 8px 10px;
  border: 1px solid #e0ddd5;
  border-radius: 8px;
  background: #faf9f6;
}

/* ── Foto's ─────────────────────────────────────────────────────────────── */
.td-photo-row {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
  margin-top: 12px;
}
.td-photo-thumb {
  width: 120px;
  height: 120px;
  object-fit: cover;
  border-radius: 8px;
  border: 1px solid #e0ddd5;
  cursor: pointer;
  transition: opacity .15s;
}
.td-photo-thumb:hover { opacity: 0.85; }

/* ── Lightbox ────────────────────────────────────────────────────────────── */
.td-lightbox {
  display: none;
  position: fixed;
  inset: 0;
  background: rgba(0,0,0,0.92);
  z-index: 99999;
  align-items: center;
  justify-content: center;
}
.td-lightbox.open { display: flex; }
.td-lb-img {
  max-width: 92vw;
  max-height: 92vh;
  width: auto;
  height: auto;
  object-fit: contain;
  border-radius: 8px;
}
.td-lb-close {
  position: fixed;
  top: 20px;
  right: 24px;
  color: #fff;
  font-size: 36px;
  cursor: pointer;
  line-height: 1;
  z-index: 100000;
  user-select: none;
}
.td-lb-close:hover { opacity: 0.7; }

/* ── Terug knop ──────────────────────────────────────────────────────────── */
.td-back-btn {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  background: #fff;
  border: 1px solid #d3d1c7;
  border-radius: 10px;
  padding: 9px 16px;
  font-size: 14px;
  font-weight: 600;
  color: #2c2c2a;
  cursor: pointer;
  margin-bottom: 20px;
  transition: background .15s;
}
.td-back-btn:hover { background: #f5f4f0; }

/* ── Loading spinner ─────────────────────────────────────────────────────── */
.td-loading {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 40px 0;
  color: #888780;
  font-size: 14px;
}
.td-spinner {
  width: 22px;
  height: 22px;
  border: 3px solid #e0ddd5;
  border-top-color: #185FA5;
  border-radius: 50%;
  animation: td-spin .7s linear infinite;
  flex-shrink: 0;
}
@keyframes td-spin { to { transform: rotate(360deg); } }

/* ── Kaart cursor ────────────────────────────────────────────────────────── */
.td-card { cursor: pointer; }

/* ── Edit knop op collectiekaart ─────────────────────────────────────────── */
.td-card { position: relative; }
.td-edit-btn {
  position: absolute;
  top: 8px;
  right: 8px;
  background: rgba(255,255,255,0.92);
  border: 1px solid #d3d1c7;
  border-radius: 8px;
  padding: 4px 8px;
  font-size: 14px;
  cursor: pointer;
  z-index: 10;
  line-height: 1;
  transition: background .15s;
}
.td-edit-btn:hover { background: #fff; box-shadow: 0 2px 8px rgba(0,0,0,0.12); }

/* ── Edit formulier ──────────────────────────────────────────────────────── */
.td-edit-form { max-width: 720px; }

.td-edit-section {
  background: #fff;
  border: 1px solid #e0ddd5;
  border-radius: 14px;
  padding: 22px;
  margin-bottom: 16px;
}
.td-edit-section-title {
  font-size: 12px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: .5px;
  color: #185FA5;
  margin-bottom: 16px;
  padding-bottom: 10px;
  border-bottom: 1px solid #f0ede5;
  display: flex;
  align-items: center;
  gap: 7px;
}
.td-edit-row2 {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 14px;
  margin-bottom: 14px;
}
@media (max-width: 560px) { .td-edit-row2 { grid-template-columns: 1fr; } }

.td-edit-field { margin-bottom: 14px; }
.td-edit-field:last-child { margin-bottom: 0; }
.td-edit-label {
  display: block;
  font-size: 11px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: .4px;
  color: #5f5e5a;
  margin-bottom: 5px;
}
.td-edit-input,
.td-edit-textarea {
  width: 100%;
  padding: 9px 12px;
  border: 1.5px solid #d3d1c7;
  border-radius: 9px;
  font-size: 14px;
  color: #2c2c2a;
  background: #faf9f6;
  outline: none;
  font-family: inherit;
  resize: vertical;
}
.td-edit-input:focus,
.td-edit-textarea:focus { border-color: #185FA5; background: #fff; }
.td-edit-textarea { min-height: 90px; line-height: 1.5; }
.td-edit-textarea-tall { min-height: 150px; }

/* Sterren */
.td-edit-stars {
  display: flex;
  flex-direction: row-reverse;
  justify-content: flex-end;
  gap: 4px;
  margin-top: 4px;
}
.td-edit-stars input[type=radio] { display: none; }
.td-edit-stars label {
  font-size: 22px;
  cursor: pointer;
  color: #d3d1c7;
  transition: color .1s;
}
.td-edit-stars input[type=radio]:checked ~ label,
.td-edit-stars label:hover,
.td-edit-stars label:hover ~ label { color: #C47900; }

/* Kleur swatches */
.td-edit-colors { display: flex; gap: 8px; flex-wrap: wrap; margin-top: 4px; }
.td-edit-color-opt { display: none; }
.td-edit-color-swatch {
  width: 26px; height: 26px;
  border-radius: 50%;
  cursor: pointer;
  border: 3px solid transparent;
  transition: transform .1s;
  display: block;
}
.td-edit-color-opt:checked + .td-edit-color-swatch {
  border-color: #2c2c2a;
  transform: scale(1.2);
}

/* Locatie accordion */
.td-edit-locations { display: flex; flex-direction: column; gap: 10px; }
.td-edit-loc {
  border: 1px solid #e8e5dd;
  border-radius: 10px;
  padding: 14px;
  background: #faf9f6;
}
.td-edit-loc-header {
  display: flex;
  align-items: center;
  gap: 10px;
  cursor: pointer;
  user-select: none;
}
.td-edit-loc-dot {
  width: 11px; height: 11px;
  border-radius: 50%;
  flex-shrink: 0;
  border: 2px solid rgba(0,0,0,.12);
}
.td-edit-loc-name-head { font-size: 14px; font-weight: 600; flex: 1; }
.td-edit-loc-order { font-size: 11px; color: #bbb; }
.td-edit-chevron { font-size: 11px; color: #bbb; transition: transform .2s; }
.td-edit-loc-body { padding-top: 14px; }
.td-edit-coords { font-size: 11px; color: #bbb; margin-top: 8px; }

/* Opslaan balk */
.td-edit-actions {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  flex-wrap: wrap;
  margin-top: 4px;
}
.td-edit-save-info { font-size: 12px; color: #888780; }
.td-edit-save-btn {
  background: #185FA5;
  color: #fff;
  border: none;
  border-radius: 10px;
  padding: 11px 28px;
  font-size: 15px;
  font-weight: 600;
  cursor: pointer;
  transition: background .15s;
}
.td-edit-save-btn:hover { background: #0C447C; }
.td-edit-save-btn:disabled { opacity: .6; cursor: default; }

/* Resultaat melding */
.td-edit-result {
  margin-top: 14px;
  padding: 11px 14px;
  border-radius: 9px;
  font-size: 13px;
  font-weight: 500;
}
.td-edit-result-ok  { background: #E8F7F2; color: #0F6E56; border: 1px solid #b3e8d5; }
.td-edit-result-err { background: #FCEBEB; color: #A32D2D; border: 1px solid #f5c0c0; }
