/* ── Oil Painting Map Styles ─────────────────────────── */

/* Painterly canvas texture overlay */
.map-container::after {
  content: '';
  position: absolute;
  inset: 0;
  background-image: 
    repeating-linear-gradient(
      0deg,
      transparent,
      transparent 2px,
      rgba(180,160,100,0.03) 2px,
      rgba(180,160,100,0.03) 4px
    ),
    repeating-linear-gradient(
      90deg,
      transparent,
      transparent 3px,
      rgba(120,100,60,0.02) 3px,
      rgba(120,100,60,0.02) 6px
    );
  pointer-events: none;
  z-index: 1;
}

.country-label {
  font-family: 'Georgia', 'Times New Roman', serif;
  /* font-size set dynamically via inline attribute for zoom scaling */
  font-weight: 600;
  font-style: italic;
  fill: #3a2e1a;
  text-anchor: middle;
  pointer-events: none;
  letter-spacing: 0.5px;
}

.port-marker {
  cursor: pointer;
  transition: opacity 0.4s ease;
}
.port-marker:hover {
  opacity: 1 !important;
}

.marker-dot {
  filter: drop-shadow(0 1px 3px rgba(0,0,0,0.4));
  transition: r 0.2s ease;
}

/* Glow animations */
@keyframes pulseRed {
  0%, 100% { opacity: 0.2; r: 12; }
  50% { opacity: 0.45; r: 16; }
}
@keyframes pulseYellow {
  0%, 100% { opacity: 0.15; r: 10; }
  50% { opacity: 0.3; r: 14; }
}

.glow-red { animation: pulseRed 2s ease-in-out infinite; }
.glow-yellow { animation: pulseYellow 2.5s ease-in-out infinite; }

/* ── News Ticker ────────────────────────────────────── */

.ticker-wrap {
  display: flex;
  align-items: stretch;
  overflow: hidden;
  border-radius: 8px;
  margin-bottom: 12px;
  font-size: 12px;
  border: 1px solid rgba(160,140,90,0.3);
  background: linear-gradient(90deg, rgba(30,25,15,0.95), rgba(20,18,12,0.9));
  box-shadow: 0 2px 8px rgba(0,0,0,0.2);
}

.ticker-label {
  display: flex;
  align-items: center;
  padding: 8px 14px;
  font-family: 'Georgia', serif;
  font-weight: 700;
  font-size: 10px;
  letter-spacing: 2px;
  color: #e8c44a;
  background: linear-gradient(135deg, rgba(160,130,50,0.3), rgba(120,100,40,0.15));
  white-space: nowrap;
  border-right: 1px solid rgba(160,140,90,0.3);
  text-shadow: 0 1px 4px rgba(0,0,0,0.5);
}

.ticker-track {
  flex: 1;
  overflow: hidden;
  display: flex;
  align-items: center;
}

.ticker-content {
  display: flex;
  white-space: nowrap;
  animation: tickerScroll 120s linear infinite;
  color: #d4c8a0;
  font-family: 'Georgia', serif;
}

.ticker-item {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 0 8px;
}

.ticker-tag {
  font-size: 10px;
  font-weight: 700;
  padding: 1px 6px;
  border-radius: 3px;
  background: rgba(160,140,90,0.2);
  color: #e8c44a;
  white-space: nowrap;
}

.ticker-sep {
  color: rgba(160,140,90,0.3);
  margin: 0 4px;
  font-size: 6px;
}

@keyframes tickerScroll {
  0% { transform: translateX(0); }
  100% { transform: translateX(-50%); }
}

/* ── Zoom controls ─────────────────────────────────── */

.zoom-controls {
  position: absolute;
  top: 10px;
  right: 10px;
  z-index: 10;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 2px;
  background: rgba(30, 25, 15, 0.85);
  border-radius: 8px;
  padding: 4px;
  border: 1px solid rgba(160, 140, 90, 0.3);
  box-shadow: 0 2px 8px rgba(0,0,0,0.3);
}

.zoom-controls button {
  width: 28px;
  height: 28px;
  border: none;
  background: rgba(160, 140, 90, 0.15);
  color: #e8c44a;
  font-size: 16px;
  font-weight: 700;
  border-radius: 5px;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: background 0.2s;
}

.zoom-controls button:hover {
  background: rgba(160, 140, 90, 0.35);
}

.zoom-level {
  font-family: 'Georgia', serif;
  font-size: 9px;
  color: #d4c8a0;
  padding: 2px 0;
}

.map-container {
  position: relative;
  border-radius: 12px;
  overflow: hidden;
  box-shadow:
    0 4px 20px rgba(0,0,0,0.3),
    inset 0 1px 0 rgba(255,255,255,0.08);
  border: 3px solid rgba(160, 140, 90, 0.4);
  background: #7aadca;
  flex: 1;
  min-height: 0;
}

.map-container svg {
  transition: viewBox 0.15s ease-out;
}

/* ── Status Card ────────────────────────────────────── */

.status-overview {
  display: flex;
  gap: 8px;
  margin-bottom: 12px;
  flex-wrap: wrap;
}

/* ── Mobile responsive ─────────────────────────────── */

@media (max-width: 639px) {
  /* Bigger zoom controls for thumb tapping */
  .zoom-controls {
    top: 6px;
    right: 6px;
  }
  .zoom-controls button {
    width: 36px;
    height: 36px;
    font-size: 20px;
  }
  .zoom-level {
    font-size: 10px;
  }

  /* Make ports more visible at default zoom on small screens */
  .port-marker {
    opacity: 0.85 !important;
  }
  .port-marker:active {
    opacity: 1 !important;
  }

  /* Ticker: slightly larger text for readability */
  .ticker-wrap {
    font-size: 13px;
  }
  .ticker-label {
    font-size: 9px;
    padding: 8px 10px;
    letter-spacing: 1.5px;
  }

  /* Frame thinner on mobile to save space */
  .painting-frame {
    padding: 4px;
    border-radius: 10px;
  }
  .map-container {
    border-width: 2px;
    border-radius: 8px;
  }
}

/* Long-press visual feedback */
.port-marker:active .marker-dot {
  filter: drop-shadow(0 0 6px rgba(74, 144, 217, 0.6)) drop-shadow(0 1px 3px rgba(0,0,0,0.4));
}

/* ── Frame effect for painterly feel ────────────────── */

.painting-frame {
  padding: 6px;
  background: linear-gradient(145deg, #a08c58, #8a7a48, #705e30);
  border-radius: 14px;
  box-shadow:
    0 6px 24px rgba(0,0,0,0.35),
    inset 0 1px 0 rgba(255,255,255,0.15),
    inset 0 -1px 0 rgba(0,0,0,0.2);
  display: flex;
  flex-direction: column;
}

/* ── Desktop two-column layout ────────────────────── */
@media (min-width: 1024px) {
  .painting-frame {
    overflow: hidden;
  }
}
