/* Keşif platformu bileşenleri — style.css'teki tasarım değişkenlerini kullanır.
   style.css'ten SONRA yüklenir; mevcut kuralları değiştirmez, sadece ekler. */

/* ---------- Başlık: Katkı Yap butonu ---------- */
.contribute-chip { background: #1d4ed8; color: #dbeafe; border-color: #2563eb; font-weight: 600; }
.contribute-chip:hover { background: #2563eb; }

/* ---------- Modal ---------- */
.modal-backdrop { position: fixed; inset: 0; background: rgba(5, 10, 20, 0.65);
  backdrop-filter: blur(3px);
  display: flex; align-items: center; justify-content: center; z-index: 50; padding: 18px; }
.modal-backdrop.hidden { display: none; }
.modal { background: var(--sidebar-bg); border: 1px solid var(--border-strong); border-radius: 12px;
  width: 100%; max-width: 520px; max-height: 88vh; max-height: 88dvh; display: flex; flex-direction: column;
  box-shadow: 0 18px 50px var(--shadow-strong); }
.modal-head { display: flex; align-items: center; justify-content: space-between;
  padding: 14px 18px; border-bottom: 1px solid var(--border); flex-shrink: 0; }
.modal-head h2 { margin: 0; font-size: 16px; color: var(--heading-accent); }
.modal-body { padding: 14px 18px 18px; overflow-y: auto; }
.modal-note { font-size: 11px; color: var(--text-faint); margin: 10px 0 0; text-align: center; }
.ctx-poi { background: var(--surface); border: 1px solid var(--border); border-radius: 8px;
  padding: 8px 12px; font-size: 12px; color: var(--text-dim); margin-bottom: 12px; }

.type-tabs { display: flex; gap: 6px; margin-bottom: 14px; flex-wrap: wrap; }
.type-tab { flex: 1; min-width: 110px; background: var(--surface); border: 1px solid var(--border);
  color: var(--text-dim); font-size: 12px; padding: 8px 10px; border-radius: 8px;
  cursor: pointer; font-family: inherit; }
.type-tab:hover:not(:disabled) { background: var(--surface-hover); color: var(--text); }
.type-tab:disabled { opacity: 0.45; cursor: not-allowed; }
.type-tab.active { background: var(--badge-hist-bg); color: var(--badge-hist-text);
  border-color: var(--heading-accent); font-weight: 600; }
.type-tab:focus-visible { outline: 2px solid var(--accent-blue); }

/* ---------- Form ---------- */
.form-group { margin-bottom: 12px; }
.form-group > label { display: block; font-size: 12px; font-weight: 600;
  color: var(--text-dim); margin-bottom: 5px; }
.form-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; }
.form-group input[type="text"], .form-group input[type="url"], .form-group input[type="date"],
.form-group input[type="email"], .form-group input[type="password"],
.form-group select, .form-group textarea {
  width: 100%; background: var(--surface); border: 1px solid var(--border); color: var(--text);
  padding: 8px 11px; border-radius: 8px; font-size: 13px; font-family: inherit; outline: none; }
.form-group input:focus, .form-group select:focus, .form-group textarea:focus {
  border-color: var(--accent-blue); }
.form-group textarea { resize: vertical; }
.link-btn { background: none; border: none; color: var(--accent-blue); font-size: 12px;
  cursor: pointer; font-family: inherit; padding: 8px 0 0; text-decoration: underline; }
.link-btn:hover { color: var(--text); }
.check-row { display: flex; align-items: center; gap: 8px; font-size: 13px;
  color: var(--text); margin: 4px 0 12px; cursor: pointer; }
.check-row input { accent-color: var(--province-selected); width: 16px; height: 16px; }
.loc-row { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; }
.loc-value { font-size: 12px; color: var(--text-dim); }

.submit-btn { width: 100%; background: #1d4ed8; color: #dbeafe; border: none;
  padding: 11px 16px; border-radius: 10px; font-size: 14px; font-weight: 600;
  cursor: pointer; font-family: inherit; margin-top: 4px; }
.submit-btn:hover:not(:disabled) { background: #2563eb; }
.submit-btn:disabled { opacity: 0.6; cursor: wait; }
.submit-btn:focus-visible { outline: 2px solid #93c5fd; outline-offset: 2px; }

/* ---------- Fotoğraf seçici ---------- */
.photo-drop { display: block; border: 2px dashed var(--border-strong); border-radius: 10px;
  padding: 16px; text-align: center; font-size: 12px; color: var(--text-dim); cursor: pointer; }
.photo-drop:hover { border-color: var(--accent-blue); color: var(--text); }
.photo-drop input { display: none; }
.photo-row { display: flex; gap: 10px; align-items: flex-start; margin-top: 10px; }
.photo-row > img { width: 64px; height: 64px; object-fit: cover; border-radius: 8px;
  border: 1px solid var(--border); flex-shrink: 0; }
.photo-fields { flex: 1; display: flex; flex-direction: column; gap: 6px; }
.photo-fields input { width: 100%; background: var(--surface); border: 1px solid var(--border);
  color: var(--text); padding: 6px 9px; border-radius: 7px; font-size: 12px; font-family: inherit; }

/* ---------- Profil ---------- */
.profile-gate { padding: 6px 2px; }
.profile-gate h3 { margin: 0 0 4px; font-size: 15px; color: var(--heading-accent); }
.profile-gate p { margin: 0 0 12px; font-size: 12px; color: var(--text-dim); }
.profile-gate .form-row { display: flex; gap: 10px; align-items: center; margin-bottom: 12px; }
.profile-gate .form-row input[type="text"] { flex: 1; background: var(--surface);
  border: 1px solid var(--border); color: var(--text); padding: 9px 12px;
  border-radius: 8px; font-size: 13px; font-family: inherit; }
.avatar-pick { width: 44px; height: 44px; border-radius: 50%; background: var(--surface);
  border: 1px dashed var(--border-strong); display: flex; align-items: center;
  justify-content: center; cursor: pointer; overflow: hidden; flex-shrink: 0; }
.avatar-pick img { width: 100%; height: 100%; object-fit: cover; }
.avatar-pick input { display: none; }

.profile-head { display: flex; align-items: center; gap: 12px; margin-bottom: 14px; }
.profile-head h3 { margin: 0; font-size: 15px; }
.profile-head small { color: var(--text-dim); font-size: 11px; }
.profile-avatar { width: 52px; height: 52px; border-radius: 50%; background: var(--surface);
  border: 2px solid var(--province-selected); display: flex; align-items: center;
  justify-content: center; font-size: 24px; overflow: hidden; flex-shrink: 0; }
.profile-avatar img { width: 100%; height: 100%; object-fit: cover; }

.badge-shelf { display: grid; grid-template-columns: repeat(auto-fill, minmax(84px, 1fr)); gap: 8px; }
.badge-tile { background: var(--surface); border: 1px solid var(--border); border-radius: 10px;
  padding: 10px 6px; text-align: center; opacity: 0.38; filter: grayscale(0.9); }
.badge-tile.earned { opacity: 1; filter: none; border-color: var(--province-selected);
  box-shadow: 0 0 0 1px var(--province-selected) inset; }
.badge-icon { display: block; font-size: 22px; margin-bottom: 4px; }
.badge-name { font-size: 10px; color: var(--text-dim); font-weight: 600; }

.contrib-row { display: flex; align-items: center; gap: 8px; padding: 7px 0;
  border-bottom: 1px solid var(--border); font-size: 12px; }
.contrib-type { color: var(--text-dim); flex-shrink: 0; }
.contrib-title { flex: 1; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.status-chip { font-size: 10px; padding: 2px 8px; border-radius: 10px; flex-shrink: 0; font-weight: 600; }
.st-pending { background: #78350f; color: #fed7aa; }
.st-approved { background: var(--badge-nat-bg); color: var(--badge-nat-text); }
.st-rejected { background: var(--error-bg); color: var(--error-text); border: 1px solid var(--error-border); }

:root[data-theme="light"] .st-pending { background: #ffedd5; color: #9a3412; border: 1px solid #fed7aa; }
:root[data-theme="light"] .st-approved { background: #dcfce7; color: #166534; border: 1px solid #bbf7d0; }
:root[data-theme="light"] .st-rejected { background: #fee2e2; color: #991b1b; border: 1px solid #fecaca; }

/* ---------- POI detay bölümleri ---------- */
.detail-section { background: var(--surface); border: 1px solid var(--border);
  border-radius: 8px; padding: 12px 14px; margin-bottom: 12px; }
.detail-section h4 { margin: 0 0 8px; font-size: 13px; color: var(--heading-accent); }
.detail-body { font-size: 12.5px; line-height: 1.55; color: var(--text-dim); }
.fact-grid { display: flex; flex-direction: column; gap: 8px; margin-top: 8px; }
.fact { display: flex; flex-direction: column; gap: 2px; font-size: 12px; color: var(--text); }
.fact small { color: var(--text-faint); }
.fact-k { font-weight: 600; color: var(--text-dim); font-size: 11px; }
.unesco-badge { color: var(--heading-accent); }

.contributor-list { display: flex; flex-direction: column; gap: 6px; }
.contributor-row { display: flex; justify-content: space-between; font-size: 12px;
  border-bottom: 1px dashed var(--border); padding-bottom: 6px; }
.contributor-role { color: var(--text-dim); }
.contributor-name { font-weight: 600; color: var(--text); }

.photo-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; margin-top: 8px; }
.community-photo { margin: 0; background: var(--surface-card); border: 1px solid var(--border);
  border-radius: 10px; overflow: hidden; box-shadow: var(--shadow-soft); }
.community-photo img { width: 100%; height: 96px; object-fit: cover; display: block; }
.community-photo figcaption { padding: 6px 9px; font-size: 11px; color: var(--text-dim);
  display: flex; flex-direction: column; gap: 2px; }
.community-photo figcaption small { color: var(--text-faint); }

.note-card { border-bottom: 1px dashed var(--border); padding: 10px 0; font-size: 12.5px; }
.note-card:last-child { border-bottom: none; }
.note-card b { color: var(--text); font-weight: 600; }
.note-card p { margin: 4px 0; color: var(--text-dim); line-height: 1.55; }
.note-card a { color: var(--accent-blue); text-decoration: none; font-weight: 500; }
.note-card small { color: var(--text-faint); font-size: 11px; }

/* ---------- Gizli yerler & keşif zinciri ---------- */
.gem-item { display: flex; align-items: center; gap: 12px; width: 100%; text-align: left;
  background: var(--surface-card); border: 1px solid var(--border); border-radius: 10px;
  padding: 10px 12px; margin-bottom: 8px; cursor: pointer; font-family: inherit; color: var(--text);
  box-shadow: var(--shadow-soft); transition: all 0.18s ease; }
.gem-item:hover { border-color: var(--accent-blue); background: var(--surface-hover); transform: translateY(-1px); }
.gem-item:focus-visible { outline: 2px solid var(--accent-blue); }
.gem-icon { font-size: 20px; flex-shrink: 0; }
.gem-text { flex: 1; min-width: 0; display: flex; flex-direction: column; gap: 2px; }
.gem-text b { font-size: 13px; font-weight: 600; }
.gem-text small { font-size: 11.5px; color: var(--text-dim); overflow: hidden;
  display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; line-height: 1.4; }
.distance-chip { background: var(--surface); border: 1px solid var(--border); color: var(--heading-accent); font-size: 11px;
  font-weight: 700; padding: 4px 9px; border-radius: 9999px; flex-shrink: 0; }

.chain-row { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; }
.chain-card { background: var(--surface-card); border: 1px solid var(--border); border-radius: 10px;
  overflow: hidden; cursor: pointer; padding: 0 0 10px; text-align: left; font-family: inherit;
  color: var(--text); display: flex; flex-direction: column; gap: 3px;
  box-shadow: var(--shadow-soft); transition: all 0.18s ease; }
.chain-card:hover { border-color: var(--accent-blue); transform: translateY(-2px); box-shadow: var(--shadow-strong); }
.chain-card:focus-visible { outline: 2px solid var(--accent-blue); }
.chain-card img { width: 100%; height: 72px; object-fit: cover; display: block; margin-bottom: 4px; }
.chain-name { font-size: 12.5px; font-weight: 600; padding: 0 10px; letter-spacing: -0.01em; }
.chain-card small { font-size: 11px; color: var(--text-dim); padding: 0 10px; }

/* ---------- Ana sayfa kartları ---------- */
.daily-card { position: relative; border-radius: 14px; overflow: hidden; cursor: pointer;
  border: 1px solid var(--border); margin-bottom: 16px; background: var(--surface-card);
  box-shadow: var(--shadow-soft); transition: all 0.2s cubic-bezier(0.4, 0, 0.2, 1); }
.daily-card:hover { border-color: var(--province-selected); transform: translateY(-2px); box-shadow: var(--shadow-strong); }
.daily-card:focus-visible { outline: 2px solid var(--accent-blue); }
.daily-card img { width: 100%; height: 130px; object-fit: cover; display: block; transition: transform 0.3s ease; }
.daily-card:hover img { transform: scale(1.03); }
.daily-tag { position: absolute; top: 10px; left: 10px; background: var(--province-selected);
  color: #fff; font-size: 11px; font-weight: 700; padding: 4px 12px; border-radius: 9999px;
  box-shadow: 0 2px 8px rgba(0,0,0,0.3); }
.daily-body { padding: 12px 16px 14px; }
.daily-body h3 { margin: 0; font-size: 15px; font-weight: 700; color: var(--heading-accent); }
.daily-body p { margin: 3px 0 0; font-size: 12px; color: var(--text-dim); }

.discover-cta { display: flex; align-items: center; gap: 14px; width: 100%; text-align: left;
  background: linear-gradient(135deg, #0284c7 0%, #4f46e5 50%, #7c3aed 100%); color: #fff; border: none;
  border-radius: 14px; padding: 16px 18px; cursor: pointer; font-family: inherit;
  margin-bottom: 16px; box-shadow: 0 6px 20px rgba(79, 70, 229, 0.35);
  transition: all 0.2s cubic-bezier(0.4, 0, 0.2, 1); }
.discover-cta:hover { transform: translateY(-2px); box-shadow: 0 8px 25px rgba(79, 70, 229, 0.5); filter: brightness(1.08); }
.discover-cta:focus-visible { outline: 2px solid #93c5fd; outline-offset: 2px; }
.cta-icon { font-size: 28px; }
.discover-cta b { display: block; font-size: 14.5px; font-weight: 700; letter-spacing: -0.01em; }
.discover-cta small { font-size: 11.5px; opacity: 0.9; }

.stats-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(96px, 1fr));
  gap: 8px; margin-bottom: 16px; }
.stat-tile { background: var(--surface); border: 1px solid var(--border); border-radius: 10px;
  padding: 10px 12px; display: flex; flex-direction: column; gap: 3px; box-shadow: var(--shadow-soft); }
.stat-v { font-size: 14.5px; font-weight: 700; color: var(--text); }
.stat-l { font-size: 11px; color: var(--text-dim); }

/* ---------- Moderasyon ---------- */
.mod-item { background: var(--surface); border: 1px solid var(--border); border-radius: 12px;
  padding: 14px 16px; margin-bottom: 14px; box-shadow: var(--shadow-soft); }
.mod-head { display: flex; align-items: baseline; gap: 8px; flex-wrap: wrap; margin-bottom: 8px; }
.mod-head b { font-size: 14px; color: var(--heading-accent); font-weight: 700; }
.mod-head small { color: var(--text-faint); font-size: 11px; margin-left: auto; }
.mod-preview p { margin: 4px 0; font-size: 13px; color: var(--text-dim); line-height: 1.6; }
.mod-meta { display: flex; gap: 6px; flex-wrap: wrap; margin: 8px 0; }
.mod-meta a { text-decoration: none; }
.mod-editor { margin-top: 10px; display: flex; flex-direction: column; gap: 8px; }
.mod-editor input, .mod-editor textarea { width: 100%; background: var(--sidebar-bg);
  border: 1px solid var(--border-strong); color: var(--text); padding: 8px 12px;
  border-radius: 8px; font-size: 13px; font-family: inherit; }
.approve-btn { background: #166534; color: #bbf7d0; border: none; padding: 8px 16px;
  border-radius: 9999px; cursor: pointer; font-size: 12px; font-family: inherit; font-weight: 600;
  transition: all 0.15s ease; }
.approve-btn:hover:not(:disabled) { background: #15803d; transform: translateY(-1px); }
.reject-btn { background: #7f1d1d; color: #fecaca; border: none; padding: 8px 16px;
  border-radius: 9999px; cursor: pointer; font-size: 12px; font-family: inherit; font-weight: 600;
  transition: all 0.15s ease; }
.reject-btn:hover:not(:disabled) { background: #991b1b; transform: translateY(-1px); }
.approve-btn:focus-visible, .reject-btn:focus-visible { outline: 2px solid var(--accent-blue); }

/* ---------- Harita üstü konum seçme bandı ve işaretçiler ---------- */
.pick-banner { position: absolute; top: 18px; left: 50%; transform: translateX(-50%);
  background: var(--glass-bg); backdrop-filter: blur(14px); border: 1px solid var(--province-selected); color: var(--text);
  border-radius: 9999px; padding: 10px 18px; font-size: 13px; font-weight: 600; z-index: 40;
  display: flex; align-items: center; gap: 14px; box-shadow: var(--shadow-strong); }
#map.picking { cursor: crosshair; }

.poi.user-place { fill: #8b5cf6; }
.poi.user-place:hover { fill: var(--poi-hover); }
.gem-focus { fill: none; stroke: #8b5cf6; stroke-width: 2; vector-effect: non-scaling-stroke; }
.gem-marker { fill: #8b5cf6; stroke: #fff; stroke-width: 1.2; vector-effect: non-scaling-stroke; }

.place-story { font-style: italic; color: var(--text-dim); }
.place-by { display: block; margin-top: 10px; color: var(--text-faint); font-size: 11.5px; font-weight: 500; }

@media (max-width: 900px) {
  .modal-backdrop { padding: 8px; align-items: flex-end; }
  .modal { max-height: 86vh; max-height: 86dvh; border-radius: 14px 14px 0 0; }
  .form-grid { grid-template-columns: 1fr; }
  .chain-row, .photo-grid { grid-template-columns: 1fr 1fr; }
}

/* ---------- Visual refresh uyarlamaları ---------- */
.contribute-chip {
  background: var(--province-selected);
  border-color: transparent;
  color: #fffaf4;
  box-shadow: 0 9px 20px -12px rgba(236, 118, 83, 0.85);
}
.contribute-chip:hover { background: #f18462; border-color: transparent; }

.modal {
  border-radius: 22px;
  box-shadow: 0 28px 80px -24px rgba(0,0,0,0.8);
}
.modal-head { padding: 18px 21px; }
.modal-head h2 {
  color: var(--text);
  font-family: var(--font-display);
  font-size: 22px;
  font-weight: 600;
}
.modal-body { padding: 18px 21px 22px; }
.type-tab, .form-group input[type="text"], .form-group input[type="url"],
.form-group input[type="date"], .form-group input[type="email"],
.form-group input[type="password"], .form-group select, .form-group textarea,
.profile-gate .form-row input[type="text"] { border-radius: 11px; }
.submit-btn {
  border-radius: 12px;
  background: var(--province-selected);
  color: #fffaf4;
}
.submit-btn:hover:not(:disabled) { background: #f18462; }

.daily-card {
  height: 238px;
  border-radius: 20px;
  margin-bottom: 14px;
  background: var(--surface);
}
.daily-card:hover { border-color: rgba(240, 204, 132, 0.62); }
.daily-media { position: relative; width: 100%; height: 100%; overflow: hidden; }
.daily-card img { width: 100%; height: 100%; object-fit: cover; }
.daily-card:hover img { transform: scale(1.045); }
.daily-fallback {
  width: 100%;
  height: 100%;
  display: grid;
  place-items: center;
  background: linear-gradient(145deg, var(--surface), var(--province-fill));
  font-size: 44px;
}
.daily-shade {
  position: absolute;
  inset: 0;
  background: linear-gradient(180deg, rgba(4,12,10,0.05) 18%, rgba(4,12,10,0.82) 100%);
  pointer-events: none;
}
.daily-tag {
  top: 14px;
  left: 14px;
  padding: 6px 10px;
  border: 1px solid rgba(255,255,255,0.22);
  border-radius: 9px;
  background: rgba(8, 27, 22, 0.72);
  color: #f9f5eb;
  backdrop-filter: blur(12px);
  box-shadow: none;
  font-size: 8.5px;
  letter-spacing: 0.14em;
  text-transform: uppercase;
}
.daily-body {
  position: absolute;
  right: 0;
  bottom: 0;
  left: 0;
  z-index: 2;
  padding: 18px 19px;
  color: #fffaf3;
}
.daily-location {
  display: block;
  margin-bottom: 4px;
  color: rgba(255,255,255,0.74);
  font-size: 9px;
  font-weight: 700;
  letter-spacing: 0.11em;
  text-transform: uppercase;
}
.daily-body h3 {
  color: #fffaf3;
  font-family: var(--font-display);
  font-size: 25px;
  font-weight: 600;
  line-height: 1;
  letter-spacing: -0.035em;
}
.daily-link {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  margin-top: 10px;
  color: rgba(255,255,255,0.88);
  font-size: 10.5px;
  font-weight: 650;
}
.daily-link b { color: var(--heading-accent); }

.discover-cta {
  gap: 12px;
  min-height: 70px;
  margin-bottom: 14px;
  padding: 13px 15px;
  border: 1px solid var(--border-strong);
  border-radius: 16px;
  background: var(--surface);
  color: var(--text);
  box-shadow: none;
}
.discover-cta:hover {
  border-color: var(--accent-blue);
  background: var(--surface-hover);
  box-shadow: none;
  filter: none;
}
.cta-icon {
  width: 39px;
  height: 39px;
  display: grid;
  place-items: center;
  flex: 0 0 auto;
  border-radius: 12px;
  background: var(--accent-blue);
  color: #09241c;
  font-size: 20px;
}
.discover-cta b { font-size: 12.5px; }
.discover-cta small { display: block; margin-top: 2px; color: var(--text-dim); font-size: 9.5px; }
.cta-arrow { margin-left: auto; color: var(--text-faint); font-size: 18px; }

.stats-grid { grid-template-columns: repeat(3, 1fr); gap: 7px; margin-bottom: 18px; }
.stat-tile {
  min-height: 67px;
  justify-content: center;
  border-radius: 13px;
  padding: 10px;
  background: transparent;
  box-shadow: none;
}
.stat-v { font-size: 13px; }
.stat-l { font-size: 8.5px; letter-spacing: 0.03em; }

.detail-section, .mod-item { border-radius: 15px; }
.detail-section h4 {
  color: var(--text);
  font-family: var(--font-display);
  font-size: 17px;
  font-weight: 600;
}
.gem-item, .chain-card, .community-photo { border-radius: 13px; }

@media (max-width: 900px) {
  .modal { border-radius: 22px 22px 0 0; }
  .daily-card { height: 224px; }
}

@media (max-width: 380px) {
  .stats-grid { grid-template-columns: repeat(2, 1fr); }
}
