/* InletShots CSS — consistent with existing ecosystem (GOTW, BuoyPal) */

*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }

:root {
  --bg: #0B1D2B;
  --card-bg: #112033;
  --card-hover: #152640;
  --border: #1E3A54;
  --text: #E8F0F8;
  --text-muted: #7A9BB5;
  --accent: #00C2B8;
  --accent-dark: #009E96;
  --danger: #E05C5C;
  --warning: #F5A623;
  --surface: #0F2236;
  --radius: 12px;
  --shadow: 0 4px 24px rgba(0,0,0,.3);
  --font: 'Inter', system-ui, sans-serif;
}

body {
  font-family: var(--font);
  background: var(--bg);
  color: var(--text);
  line-height: 1.6;
  min-height: 100vh;
}

/* ─── Header ─────────────────────────────────────────────────────────────── */

.is-header {
  background: rgba(11, 29, 43, .95);
  border-bottom: 1px solid var(--border);
  backdrop-filter: blur(12px);
  position: sticky;
  top: 0;
  z-index: 100;
}

.header-inner {
  max-width: 1100px;
  margin: 0 auto;
  padding: 12px 20px;
  display: flex;
  align-items: center;
  gap: 16px;
}

.logo {
  display: flex;
  align-items: center;
  gap: 8px;
  text-decoration: none;
  flex-shrink: 0;
}

.logo-icon {
  font-size: 24px;
}

.logo-text {
  font-size: 20px;
  font-weight: 800;
  color: var(--text);
  letter-spacing: -.5px;
}

.logo-text span {
  color: var(--accent);
}

.header-nav {
  display: flex;
  align-items: center;
  gap: 12px;
  margin-left: auto;
}

.nav-link {
  color: var(--text-muted);
  text-decoration: none;
  font-size: 14px;
  font-weight: 500;
  padding: 6px 10px;
  border-radius: 8px;
  transition: color .15s, background .15s;
}

.nav-link:hover { color: var(--text); background: rgba(255,255,255,.05); }

.login-btn {
  background: var(--accent);
  color: #000;
  font-weight: 700;
  font-size: 13px;
  padding: 7px 16px;
  border-radius: 8px;
  text-decoration: none;
  transition: background .15s;
}

.login-btn:hover { background: var(--accent-dark); }

/* ─── Hero ───────────────────────────────────────────────────────────────── */

.hero {
  text-align: center;
  padding: 60px 20px 32px;
}

.hero-eyebrow {
  font-size: 13px;
  font-weight: 600;
  color: var(--accent);
  text-transform: uppercase;
  letter-spacing: 1.5px;
  margin-bottom: 12px;
}

.hero-title {
  font-size: clamp(32px, 6vw, 64px);
  font-weight: 800;
  line-height: 1.1;
  margin-bottom: 16px;
  letter-spacing: -1px;
}

.hero-title em { font-style: normal; color: var(--accent); }

.hero-sub {
  font-size: 18px;
  color: var(--text-muted);
  max-width: 540px;
  margin: 0 auto 32px;
}

/* ─── Map ────────────────────────────────────────────────────────────────── */

.map-wrap {
  position: relative;
  margin: 0 20px 32px;
  border-radius: var(--radius);
  overflow: hidden;
  border: 1px solid var(--border);
  box-shadow: var(--shadow);
}

#inlet-map { height: 420px; }

#map-legend {
  position: absolute;
  bottom: 12px;
  left: 12px;
  background: rgba(11,29,43,.85);
  border: 1px solid var(--border);
  border-radius: 8px;
  padding: 8px 12px;
  z-index: 1000;
}

.ml-item {
  font-size: 12px;
  color: var(--text-muted);
  line-height: 1.8;
}

/* ─── Inlet List ─────────────────────────────────────────────────────────── */

.inlet-list-section {
  max-width: 1100px;
  margin: 0 auto;
  padding: 0 20px 48px;
}

.section-title {
  font-size: 22px;
  font-weight: 700;
  margin-bottom: 16px;
  color: var(--text);
}

.inlet-count { font-size: 16px; color: var(--text-muted); }

.inlet-table-wrap {
  overflow-x: auto;
  border-radius: var(--radius);
  border: 1px solid var(--border);
}

.inlet-table {
  width: 100%;
  border-collapse: collapse;
}

.inlet-table th {
  background: var(--surface);
  color: var(--text-muted);
  font-size: 12px;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: .8px;
  padding: 12px 16px;
  text-align: left;
  border-bottom: 1px solid var(--border);
}

.inlet-table td {
  padding: 12px 16px;
  border-bottom: 1px solid rgba(30,58,84,.5);
  font-size: 14px;
  color: var(--text);
}

.inlet-table tr:last-child td { border-bottom: none; }
.inlet-table tr:hover td { background: var(--card-hover); }

.inlet-table td a {
  color: var(--accent);
  font-weight: 600;
  text-decoration: none;
}

.inlet-table td a:hover { text-decoration: underline; }

/* ─── Inlet Detail ────────────────────────────────────────────────────────── */

.breadcrumb {
  max-width: 1100px;
  margin: 16px auto 0;
  padding: 0 20px;
  font-size: 14px;
  color: var(--text-muted);
}

.breadcrumb a { color: var(--accent); text-decoration: none; }
.breadcrumb a:hover { text-decoration: underline; }

.inlet-hero {
  max-width: 1100px;
  margin: 0 auto;
  padding: 24px 20px 40px;
}

.inlet-title {
  font-size: clamp(28px, 5vw, 48px);
  font-weight: 800;
  letter-spacing: -1px;
  margin-bottom: 8px;
}

.inlet-region-badge {
  display: inline-block;
  background: rgba(0,194,184,.15);
  color: var(--accent);
  font-size: 13px;
  font-weight: 600;
  padding: 4px 12px;
  border-radius: 20px;
  margin-bottom: 12px;
}

.inlet-desc {
  color: var(--text-muted);
  font-size: 16px;
  max-width: 600px;
  line-height: 1.7;
  margin-bottom: 12px;
}

.inlet-coords {
  font-size: 13px;
  color: var(--text-muted);
  font-family: monospace;
}

.content-section {
  max-width: 1100px;
  margin: 0 auto;
  padding: 0 20px 48px;
}

.section-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 20px;
  flex-wrap: wrap;
  gap: 12px;
}

.count-badge {
  background: rgba(255,255,255,.1);
  color: var(--text-muted);
  font-size: 14px;
  padding: 2px 8px;
  border-radius: 12px;
  font-weight: 600;
}

/* ─── Conditions ─────────────────────────────────────────────────────────── */

.conditions-list { display: flex; flex-direction: column; gap: 12px; }

.condition-card {
  background: var(--card-bg);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 16px;
}

.cond-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 8px;
}

.cond-user { font-weight: 600; font-size: 14px; color: var(--accent); }
.cond-date { font-size: 12px; color: var(--text-muted); }

.cond-row { font-size: 14px; line-height: 1.7; }
.cond-row.hazard { color: var(--warning); }
.cond-label { color: var(--text-muted); margin-right: 6px; }
.cond-notes { font-size: 14px; color: var(--text-muted); margin-top: 8px; font-style: italic; }
.cond-photo { width: 100%; max-width: 300px; border-radius: 8px; margin-top: 8px; }

/* ─── Photo Grid ───────────────────────────────────────────────────────────── */

.photo-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(220px, 1fr));
  gap: 16px;
}

.photo-card {
  background: var(--card-bg);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  overflow: hidden;
  transition: border-color .2s, transform .2s;
}

.photo-card:hover { border-color: var(--accent); transform: translateY(-2px); }

.photo-img-wrap { position: relative; aspect-ratio: 16/10; overflow: hidden; }
.photo-img { width: 100%; height: 100%; object-fit: cover; display: block; }

.watermark-overlay {
  position: absolute;
  bottom: 0; left: 0; right: 0;
  background: linear-gradient(transparent, rgba(0,0,0,.7));
  color: rgba(255,255,255,.7);
  font-size: 11px;
  font-weight: 700;
  padding: 6px 10px;
  letter-spacing: .5px;
  text-align: right;
}

.watermark-overlay-lg {
  position: absolute;
  bottom: 8px; right: 8px;
  background: rgba(0,0,0,.5);
  color: rgba(255,255,255,.8);
  font-size: 12px;
  font-weight: 700;
  padding: 4px 10px;
  border-radius: 4px;
}

.sale-badge {
  position: absolute;
  top: 10px; right: 10px;
  background: var(--accent);
  color: #000;
  font-weight: 800;
  font-size: 13px;
  padding: 4px 10px;
  border-radius: 20px;
}

.photo-meta { padding: 12px; }
.photo-owner { font-size: 12px; color: var(--accent); font-weight: 600; }
.photo-caption { font-size: 13px; color: var(--text-muted); margin-top: 2px; }
.photo-date { font-size: 11px; color: var(--text-muted); margin-top: 4px; }
.photo-buy-btn {
  display: inline-block;
  margin-top: 8px;
  background: var(--accent);
  color: #000;
  font-size: 12px;
  font-weight: 700;
  padding: 5px 12px;
  border-radius: 6px;
  text-decoration: none;
}

/* ─── Lightbox ─────────────────────────────────────────────────────────────── */

.lightbox {
  position: fixed;
  inset: 0;
  background: rgba(0,0,0,.95);
  z-index: 1000;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-direction: column;
  gap: 16px;
}

.lightbox.hidden { display: none; }

.lb-close {
  position: absolute;
  top: 20px; right: 20px;
  background: rgba(255,255,255,.1);
  color: #fff;
  border: none;
  width: 40px; height: 40px;
  border-radius: 50%;
  font-size: 20px;
  cursor: pointer;
  transition: background .15s;
}

.lb-close:hover { background: rgba(255,255,255,.2); }

.lb-img {
  max-width: 90vw;
  max-height: 80vh;
  object-fit: contain;
  border-radius: var(--radius);
  box-shadow: var(--shadow);
}

.lb-caption {
  color: var(--text-muted);
  font-size: 14px;
  text-align: center;
}

/* ─── Forms ────────────────────────────────────────────────────────────────── */

.submit-form {
  background: var(--card-bg);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 20px;
  margin-bottom: 20px;
}

.submit-form.hidden { display: none; }

.cond-form .form-row {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 16px;
}

.cond-form .form-group {
  display: flex;
  flex-direction: column;
  gap: 6px;
  margin-bottom: 16px;
}

.cond-form label {
  font-size: 13px;
  font-weight: 600;
  color: var(--text-muted);
}

.form-input {
  background: var(--surface);
  border: 1px solid var(--border);
  color: var(--text);
  font-size: 14px;
  padding: 10px 12px;
  border-radius: 8px;
  font-family: var(--font);
  transition: border-color .15s;
}

.form-input:focus {
  outline: none;
  border-color: var(--accent);
}

.file-input {
  background: var(--surface);
  border: 1px dashed var(--border);
  color: var(--text-muted);
  font-size: 14px;
  padding: 12px;
  border-radius: 8px;
  width: 100%;
  cursor: pointer;
}

.form-actions {
  display: flex;
  gap: 10px;
  align-items: center;
}

.btn-primary {
  background: var(--accent);
  color: #000;
  font-weight: 700;
  font-size: 14px;
  padding: 10px 20px;
  border: none;
  border-radius: 8px;
  cursor: pointer;
  transition: background .15s;
  text-decoration: none;
  display: inline-block;
}

.btn-primary:hover { background: var(--accent-dark); }

.btn-secondary {
  background: transparent;
  color: var(--text-muted);
  font-weight: 600;
  font-size: 14px;
  padding: 10px 20px;
  border: 1px solid var(--border);
  border-radius: 8px;
  cursor: pointer;
  text-decoration: none;
  display: inline-block;
  transition: color .15s, border-color .15s;
}

.btn-secondary:hover { color: var(--text); border-color: var(--text-muted); }

#price-row.hidden { display: none; }

/* ─── Marketplace ────────────────────────────────────────────────────────── */

.mp-hero {
  padding: 40px 20px 24px;
  text-align: center;
}

.mp-title {
  font-size: clamp(28px, 5vw, 48px);
  font-weight: 800;
  letter-spacing: -1px;
  margin-bottom: 8px;
}

.mp-sub { color: var(--text-muted); font-size: 16px; }

.mp-filters {
  display: flex;
  gap: 12px;
  padding: 0 20px 24px;
  max-width: 1100px;
  margin: 0 auto;
  flex-wrap: wrap;
}

.filter-select {
  background: var(--card-bg);
  border: 1px solid var(--border);
  color: var(--text);
  font-size: 13px;
  padding: 8px 12px;
  border-radius: 8px;
  cursor: pointer;
  font-family: var(--font);
}

.filter-select:focus { outline: none; border-color: var(--accent); }

.mp-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(260px, 1fr));
  gap: 20px;
  max-width: 1100px;
  margin: 0 auto;
  padding: 0 20px 48px;
}

.mp-card {
  background: var(--card-bg);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  overflow: hidden;
  text-decoration: none;
  transition: border-color .2s, transform .2s;
}

.mp-card:hover { border-color: var(--accent); transform: translateY(-3px); }

.mp-img-wrap { position: relative; aspect-ratio: 16/10; overflow: hidden; }
.mp-img { width: 100%; height: 100%; object-fit: cover; display: block; }
.mp-price {
  position: absolute;
  top: 10px; right: 10px;
  background: var(--accent);
  color: #000;
  font-weight: 800;
  font-size: 14px;
  padding: 4px 10px;
  border-radius: 20px;
}

.mp-meta { padding: 14px; }
.mp-inlet { font-size: 12px; color: var(--accent); font-weight: 600; margin-bottom: 2px; }
.mp-photographer { font-size: 13px; color: var(--text-muted); }
.mp-caption { font-size: 13px; color: var(--text); margin-top: 4px; }
.mp-date { font-size: 11px; color: var(--text-muted); margin-top: 4px; }

/* ─── Photo Detail ─────────────────────────────────────────────────────────── */

.photo-detail-page {
  max-width: 1100px;
  margin: 0 auto;
  padding: 24px 20px 48px;
}

.purchase-success {
  background: rgba(0,194,184,.15);
  border: 1px solid rgba(0,194,184,.3);
  color: var(--accent);
  padding: 16px 20px;
  border-radius: var(--radius);
  font-weight: 600;
  margin-bottom: 20px;
}

.photo-detail-grid {
  display: grid;
  grid-template-columns: 1fr 360px;
  gap: 32px;
  align-items: start;
}

.photo-detail-img-wrap { position: relative; border-radius: var(--radius); overflow: hidden; }
.photo-detail-img { width: 100%; display: block; }

.photo-detail-info { padding-top: 4px; }
.pd-inlet {
  font-size: 13px;
  font-weight: 600;
  color: var(--accent);
  margin-bottom: 6px;
}

.pd-inlet a { color: var(--accent); text-decoration: none; }
.pd-inlet a:hover { text-decoration: underline; }

.pd-title {
  font-size: 24px;
  font-weight: 700;
  margin-bottom: 8px;
}

.pd-photographer { font-size: 14px; color: var(--text-muted); margin-bottom: 4px; }
.pd-date { font-size: 13px; color: var(--text-muted); margin-bottom: 16px; }
.pd-price { font-size: 32px; font-weight: 800; color: var(--accent); margin-bottom: 4px; }
.pd-license { font-size: 13px; color: var(--text-muted); margin-bottom: 16px; }

.buy-form { margin-bottom: 12px; }

.btn-buy {
  display: block;
  width: 100%;
  background: var(--accent);
  color: #000;
  font-weight: 800;
  font-size: 16px;
  padding: 14px;
  border: none;
  border-radius: 10px;
  cursor: pointer;
  text-decoration: none;
  text-align: center;
  transition: background .15s;
}

.btn-buy:hover { background: var(--accent-dark); }
.btn-buy:disabled { opacity: .6; cursor: not-allowed; }

.error-msg { color: var(--danger); font-size: 14px; margin-top: 8px; }
.pd-not-for-sale { font-size: 14px; color: var(--text-muted); font-style: italic; }

/* ─── Admin ────────────────────────────────────────────────────────────────── */

.admin-section {
  max-width: 1100px;
  margin: 0 auto;
  padding: 32px 20px 48px;
}

.admin-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 24px;
}

.admin-title {
  font-size: 28px;
  font-weight: 800;
}

.inlet-table .actions { white-space: nowrap; }

.btn-edit {
  background: rgba(0,194,184,.15);
  color: var(--accent);
  font-size: 13px;
  font-weight: 600;
  padding: 6px 14px;
  border-radius: 6px;
  text-decoration: none;
  margin-right: 6px;
  border: 1px solid rgba(0,194,184,.2);
  transition: background .15s;
}

.btn-edit:hover { background: rgba(0,194,184,.25); }

.btn-delete {
  background: rgba(224,92,92,.15);
  color: var(--danger);
  font-size: 13px;
  font-weight: 600;
  padding: 6px 14px;
  border-radius: 6px;
  cursor: pointer;
  border: 1px solid rgba(224,92,92,.2);
  transition: background .15s;
}

.btn-delete:hover { background: rgba(224,92,92,.25); }

/* Modal */
.modal {
  position: fixed;
  inset: 0;
  background: rgba(0,0,0,.8);
  z-index: 500;
  display: flex;
  align-items: center;
  justify-content: center;
}

.modal.hidden { display: none; }

.modal-box {
  background: var(--card-bg);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 28px;
  max-width: 400px;
  width: 90%;
}

.modal-box h3 { font-size: 20px; font-weight: 700; margin-bottom: 8px; }
.modal-box p { font-size: 14px; color: var(--text-muted); line-height: 1.6; }
.modal-warn { color: var(--warning); font-weight: 600; margin-top: 8px; }

.modal-actions {
  display: flex;
  gap: 10px;
  margin-top: 20px;
}

.btn-delete-confirm {
  background: var(--danger);
  color: #fff;
  font-weight: 700;
  font-size: 14px;
  padding: 10px 20px;
  border: none;
  border-radius: 8px;
  cursor: pointer;
}

/* ─── Empty State ──────────────────────────────────────────────────────────── */

.empty-state {
  text-align: center;
  padding: 48px 20px;
  color: var(--text-muted);
  font-size: 16px;
  background: var(--card-bg);
  border: 1px dashed var(--border);
  border-radius: var(--radius);
}

/* ─── Footer ────────────────────────────────────────────────────────────────── */

.is-footer {
  border-top: 1px solid var(--border);
  padding: 24px 20px;
  text-align: center;
  color: var(--text-muted);
  font-size: 13px;
}

.is-footer a { color: var(--accent); text-decoration: none; }
.is-footer a:hover { text-decoration: underline; }

/* ─── Responsive ────────────────────────────────────────────────────────────── */

@media (max-width: 768px) {
  .photo-detail-grid { grid-template-columns: 1fr; }

  .cond-form .form-row { grid-template-columns: 1fr; }

  .mp-grid { grid-template-columns: repeat(auto-fill, minmax(160px, 1fr)); }

  .photo-grid { grid-template-columns: repeat(auto-fill, minmax(160px, 1fr)); }

  #inlet-map { height: 300px; }

  .section-header { flex-direction: column; align-items: flex-start; }
}

@media (max-width: 640px) {
  .hero { padding: 40px 16px 24px; }
  .hero-title { font-size: 32px; }

  .mp-grid { grid-template-columns: repeat(2, 1fr); }
  .photo-grid { grid-template-columns: repeat(2, 1fr); }

  .logo-text { font-size: 16px; }
  .logo-icon { font-size: 20px; }

  .header-inner { flex-wrap: wrap; gap: 8px; }

  .header-nav { gap: 6px; flex-shrink: 0; }
  .nav-link { font-size: 12px; padding: 5px 7px; }
  .login-btn { font-size: 12px; padding: 5px 10px; }
}