/*
Theme Name: BS Travels
Theme URI: https://briansilva.com
Author: Brian Silva
Author URI: https://briansilva.com
Description: The Travels & Adventures of Brian & Stephanie — full-screen watercolor map travel journal.
Version: 1.0.0
License: GNU General Public License v2 or later
Text Domain: bs-travels
*/

/* ==========================================================================
   Reset & Base
   ========================================================================== */

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

html, body {
  height: 100%;
  width: 100%;
  overflow: hidden;
  font-family: 'EB Garamond', Georgia, serif;
  background: #1e1a10;
}

a {
  color: inherit;
  text-decoration: none;
}

/* ==========================================================================
   Full-screen Map Container
   ========================================================================== */

#map {
  position: fixed;
  inset: 0;
  z-index: 0;
}

/* Leaflet attribution — keep it subtle */
.leaflet-control-attribution {
  background: rgba(20, 16, 8, 0.6) !important;
  color: rgba(255,255,255,0.4) !important;
  font-size: 10px !important;
}

.leaflet-control-attribution a {
  color: rgba(255,255,255,0.5) !important;
}

.leaflet-control-zoom {
  border: none !important;
  box-shadow: none !important;
}

.leaflet-control-zoom a {
  background: rgba(30, 24, 12, 0.82) !important;
  color: #c8a84b !important;
  border: 1px solid rgba(200, 168, 75, 0.25) !important;
  font-size: 16px !important;
  width: 32px !important;
  height: 32px !important;
  line-height: 30px !important;
}

.leaflet-control-zoom a:hover {
  background: rgba(50, 40, 18, 0.9) !important;
  color: #e0c060 !important;
}

/* ==========================================================================
   Title Overlay
   ========================================================================== */

#site-title-overlay {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  z-index: 10;
  padding: 28px 36px 48px;
  background: linear-gradient(180deg, rgba(18,14,6,0.72) 0%, transparent 100%);
  pointer-events: none;
}

#site-title-overlay .eyebrow {
  font-family: 'Cinzel', 'Trajan Pro', serif;
  font-size: 10px;
  letter-spacing: 0.22em;
  color: #c8a84b;
  text-transform: uppercase;
  margin-bottom: 6px;
  opacity: 0.85;
}

#site-title-overlay h1 {
  font-family: 'EB Garamond', Georgia, serif;
  font-size: clamp(22px, 3.5vw, 40px);
  font-weight: 400;
  color: #f0e6c8;
  line-height: 1.15;
  text-shadow: 0 2px 12px rgba(0,0,0,0.5);
  letter-spacing: 0.01em;
}

#site-title-overlay .tagline {
  font-family: 'EB Garamond', Georgia, serif;
  font-size: clamp(13px, 1.4vw, 16px);
  color: rgba(240,230,200,0.55);
  margin-top: 5px;
  font-style: italic;
}

/* ==========================================================================
   Stats Bar (bottom-left)
   ========================================================================== */

#stats-bar {
  position: fixed;
  bottom: 28px;
  left: 28px;
  z-index: 10;
  display: flex;
  gap: 20px;
  align-items: center;
  background: rgba(18, 14, 6, 0.78);
  border: 1px solid rgba(200, 168, 75, 0.2);
  border-radius: 6px;
  padding: 10px 18px;
  pointer-events: none;
}

#stats-bar .stat {
  text-align: center;
}

#stats-bar .stat-num {
  font-family: 'EB Garamond', Georgia, serif;
  font-size: 20px;
  color: #c8a84b;
  line-height: 1;
}

#stats-bar .stat-label {
  font-size: 9px;
  color: rgba(200,168,75,0.55);
  text-transform: uppercase;
  letter-spacing: 0.12em;
  margin-top: 3px;
}

#stats-bar .stat-divider {
  width: 1px;
  height: 28px;
  background: rgba(200,168,75,0.18);
}

/* ==========================================================================
   Current Location Badge (bottom-right)
   ========================================================================== */

#current-location-badge {
  position: fixed;
  bottom: 28px;
  right: 28px;
  z-index: 10;
  display: flex;
  align-items: center;
  gap: 8px;
  background: rgba(18, 14, 6, 0.78);
  border: 1px solid rgba(200, 168, 75, 0.2);
  border-radius: 6px;
  padding: 9px 14px;
  font-family: 'EB Garamond', Georgia, serif;
  color: #f0e6c8;
  font-size: 14px;
  pointer-events: none;
}

#current-location-badge .pulse {
  width: 8px;
  height: 8px;
  background: #e05c2a;
  border-radius: 50%;
  animation: pulse 2s ease-in-out infinite;
  flex-shrink: 0;
}

@keyframes pulse {
  0%, 100% { box-shadow: 0 0 0 0 rgba(224, 92, 42, 0.6); }
  50%       { box-shadow: 0 0 0 6px rgba(224, 92, 42, 0); }
}

#current-location-badge .loc-label {
  font-size: 10px;
  color: rgba(200,168,75,0.6);
  text-transform: uppercase;
  letter-spacing: 0.1em;
  display: block;
  line-height: 1;
  margin-bottom: 2px;
}

#current-location-badge .loc-name {
  display: block;
  color: #f0e6c8;
  font-size: 14px;
  line-height: 1;
}

/* ==========================================================================
   Map Pin Styles
   ========================================================================== */

.map-pin-visited {
  width: 14px;
  height: 14px;
  background: #8b5e1a;
  border: 2px solid #f0e6c8;
  border-radius: 50%;
  box-shadow: 0 1px 5px rgba(0,0,0,0.5);
  cursor: pointer;
  transition: transform 0.15s ease;
}

.map-pin-visited:hover {
  transform: scale(1.3);
}

.map-pin-current {
  width: 16px;
  height: 16px;
  background: #e05c2a;
  border: 2px solid #f0e6c8;
  border-radius: 50%;
  box-shadow: 0 0 0 4px rgba(224, 92, 42, 0.3), 0 1px 5px rgba(0,0,0,0.5);
  cursor: pointer;
  animation: pin-pulse 2.5s ease-in-out infinite;
}

@keyframes pin-pulse {
  0%, 100% { box-shadow: 0 0 0 3px rgba(224,92,42,0.35), 0 1px 5px rgba(0,0,0,0.5); }
  50%       { box-shadow: 0 0 0 8px rgba(224,92,42,0.08), 0 1px 5px rgba(0,0,0,0.5); }
}

/* ==========================================================================
   Popup Styles
   ========================================================================== */

.leaflet-popup-content-wrapper {
  background: rgba(22, 17, 8, 0.94) !important;
  border: 1px solid rgba(200, 168, 75, 0.3) !important;
  border-radius: 6px !important;
  box-shadow: 0 4px 24px rgba(0,0,0,0.5) !important;
  padding: 0 !important;
  overflow: hidden;
}

.leaflet-popup-tip {
  background: rgba(22, 17, 8, 0.94) !important;
}

.leaflet-popup-content {
  margin: 0 !important;
  width: 220px !important;
}

.pin-popup {
  font-family: 'EB Garamond', Georgia, serif;
}

.pin-popup .popup-photo {
  width: 100%;
  height: 120px;
  object-fit: cover;
  display: block;
}

.pin-popup .popup-photo-placeholder {
  width: 100%;
  height: 80px;
  background: rgba(200, 168, 75, 0.06);
  border-bottom: 1px solid rgba(200,168,75,0.12);
}

.pin-popup .popup-body {
  padding: 12px 14px;
}

.pin-popup .popup-date {
  font-size: 10px;
  color: rgba(200, 168, 75, 0.6);
  text-transform: uppercase;
  letter-spacing: 0.1em;
  margin-bottom: 4px;
}

.pin-popup .popup-name {
  font-size: 17px;
  color: #f0e6c8;
  font-weight: 400;
  line-height: 1.2;
  margin-bottom: 6px;
}

.pin-popup .popup-excerpt {
  font-size: 12px;
  color: rgba(240,230,200,0.5);
  line-height: 1.5;
  margin-bottom: 10px;
  font-style: italic;
}

.pin-popup .popup-link {
  display: inline-block;
  font-size: 11px;
  color: #c8a84b;
  border: 1px solid rgba(200,168,75,0.3);
  border-radius: 3px;
  padding: 4px 10px;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  transition: background 0.15s;
  pointer-events: all;
}

.pin-popup .popup-link:hover {
  background: rgba(200,168,75,0.1);
}

/* ==========================================================================
   Inner Pages (posts, galleries)
   ========================================================================== */

body.single,
body.page {
  overflow: auto;
  background: #f5f0e8;
}

body.single #map,
body.single-location #map {
  display: none;
}

.site-content {
  max-width: 860px;
  margin: 0 auto;
  padding: 48px 24px 80px;
}

.entry-header {
  margin-bottom: 36px;
  border-bottom: 1px solid rgba(139, 94, 26, 0.2);
  padding-bottom: 24px;
}

.entry-eyebrow {
  font-family: 'Cinzel', serif;
  font-size: 10px;
  letter-spacing: 0.2em;
  color: #8b5e1a;
  text-transform: uppercase;
  margin-bottom: 8px;
}

.entry-title {
  font-family: 'EB Garamond', Georgia, serif;
  font-size: clamp(28px, 4vw, 48px);
  font-weight: 400;
  color: #2a1f0e;
  line-height: 1.1;
}

.entry-meta {
  font-size: 13px;
  color: #8b7355;
  margin-top: 10px;
  font-style: italic;
}

.entry-content {
  font-family: 'EB Garamond', Georgia, serif;
  font-size: 18px;
  color: #2a1f0e;
  line-height: 1.75;
}

.entry-content p { margin-bottom: 1.25em; }
.entry-content h2 { font-size: 24px; margin: 2em 0 0.75em; color: #1a1208; font-weight: 400; }
.entry-content img { max-width: 100%; border-radius: 4px; margin: 1.5em 0; }

/* Photo grid for gallery posts */
.photo-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
  gap: 8px;
  margin: 2em 0;
}

.photo-grid img {
  width: 100%;
  height: 180px;
  object-fit: cover;
  border-radius: 4px;
  margin: 0;
  cursor: pointer;
  transition: opacity 0.15s;
}

.photo-grid img:hover { opacity: 0.88; }

/* Back to map link */
.back-to-map {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-family: 'Cinzel', serif;
  font-size: 10px;
  letter-spacing: 0.15em;
  color: #8b5e1a;
  text-transform: uppercase;
  margin-bottom: 32px;
  opacity: 0.75;
  transition: opacity 0.15s;
}

.back-to-map:hover { opacity: 1; }

/* ==========================================================================
   Add-Pin Page (admin form)
   ========================================================================== */

body.page-template-add-pin {
  background: #1e1a10;
  overflow: auto;
}

.add-pin-wrap {
  max-width: 520px;
  margin: 60px auto;
  padding: 0 20px 80px;
}

.add-pin-wrap h2 {
  font-family: 'EB Garamond', Georgia, serif;
  font-size: 28px;
  font-weight: 400;
  color: #f0e6c8;
  margin-bottom: 6px;
}

.add-pin-wrap .form-sub {
  font-size: 13px;
  color: rgba(200,168,75,0.5);
  margin-bottom: 28px;
  font-style: italic;
}

.add-pin-wrap label {
  display: block;
  font-size: 10px;
  color: #c8a84b;
  text-transform: uppercase;
  letter-spacing: 0.12em;
  margin-bottom: 6px;
}

.add-pin-wrap input[type="text"],
.add-pin-wrap input[type="date"],
.add-pin-wrap input[type="url"],
.add-pin-wrap textarea,
.add-pin-wrap select {
  width: 100%;
  background: rgba(255,255,255,0.05);
  border: 1px solid rgba(200,168,75,0.2);
  border-radius: 4px;
  padding: 10px 12px;
  color: #f0e6c8;
  font-family: 'EB Garamond', Georgia, serif;
  font-size: 16px;
  margin-bottom: 20px;
  outline: none;
  transition: border-color 0.15s;
}

.add-pin-wrap input:focus,
.add-pin-wrap textarea:focus,
.add-pin-wrap select:focus {
  border-color: rgba(200,168,75,0.55);
}

.add-pin-wrap .field-row {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 16px;
}

.add-pin-wrap .submit-btn {
  width: 100%;
  padding: 13px;
  background: rgba(200,168,75,0.12);
  border: 1px solid rgba(200,168,75,0.35);
  border-radius: 4px;
  color: #c8a84b;
  font-family: 'Cinzel', serif;
  font-size: 12px;
  letter-spacing: 0.15em;
  text-transform: uppercase;
  cursor: pointer;
  margin-top: 8px;
  transition: background 0.15s;
}

.add-pin-wrap .submit-btn:hover {
  background: rgba(200,168,75,0.2);
}

.add-pin-wrap .success-msg {
  background: rgba(200,168,75,0.08);
  border: 1px solid rgba(200,168,75,0.25);
  border-radius: 4px;
  padding: 14px;
  color: #c8a84b;
  font-size: 14px;
  margin-bottom: 20px;
  display: none;
}

/* ==========================================================================
   Responsive
   ========================================================================== */

@media (max-width: 600px) {
  #site-title-overlay {
    padding: 20px 20px 40px;
  }

  #stats-bar {
    bottom: 16px;
    left: 16px;
    padding: 8px 12px;
    gap: 14px;
  }

  #current-location-badge {
    bottom: 16px;
    right: 16px;
    padding: 7px 10px;
  }

  .add-pin-wrap .field-row {
    grid-template-columns: 1fr;
  }
}
