/* map.css (merged) */
/* Full-screen map */
html, body {
  height: 100%;
  margin: 0;
  padding: 0;
}

#map {
  width: 100%;
  height: 700px;
}

/* Default popup font size */
.leaflet-popup-content {
  font-size: 16px;  /* bigger default */
  line-height: 1.4;
  overflow-y: auto;
  overflow-x: hidden;
}

/* Make popups larger on small screens */
@media (max-width: 600px) {
  .leaflet-popup-content {
    font-size: 25px;   /* larger text for smartphones */
    line-height: 1.5;
  }

  .leaflet-popup-content strong {
    font-size: 25px;  /* make bold country names stand out */
  }
}

/* Popup overlay and mobile popup adjustments (from weekendmap.css) */
@media (max-width: 600px) {
  .leaflet-popup-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100vw;
    height: 100vh;
    background: rgba(0,0,0,0.5);
    z-index: 1000;
    display: flex;
    align-items: center;
    justify-content: center;
  }

  .leaflet-popup-content {
    background: #fff;
    border-radius: 8px;
    padding: 24px 16px;
    max-width: 90vw;
    box-shadow: 0 4px 24px rgba(0,0,0,0.2);
    text-align: center;
    position: relative;
    font-size: 22px;  /* slightly smaller for better fit */
    line-height: 1.4;
  }

  .leaflet-popup-close {
    position: absolute;
    top: 8px;
    right: 12px;
    background: none;
    border: none;
    font-size: 1.5rem;
    color: #888;
    cursor: pointer;
  }
}

.leaflet-popup-content.big-popup {
  margin: 0;
  padding: 0;
}
.big-popup {
  font-size: 1.2rem;
  line-height: 1.5;
  max-width: 95vw;
  padding: 1.2em 1em;
  word-break: break-word;
}
@media (max-width: 600px) {
  .big-popup {
    font-size: 1.1rem;
    max-width: 98vw;
    padding: 1.5em 0.5em;
  }
  .leaflet-popup-content-wrapper, .leaflet-popup-tip {
    max-width: 98vw !important;
    width: 98vw !important;
  }
}

/* top5 box (from weekendmap.css) */
#top5-box {
  position: absolute;
  top: 10px;
  right: 10px;
  background: white;
  border-radius: 12px;
  box-shadow: 0 4px 10px rgba(0,0,0,0.3);
  padding: 15px 20px;
  font-size: 30px;
  line-height: 1.5;
  max-width: 320px;
  max-height: 500px; /* περιορισμός συνολικού κουτιού */
  overflow-y: auto;  /* scroll αν χρειαστεί */
  z-index: 1000;
}
#top5-box h4 { margin: 0 0 10px; text-align: center; }
#top5-list { list-style: none; padding: 0; margin: 0; }
#top5-list li { margin-bottom: 12px; padding-bottom: 10px; border-bottom: 1px solid #eee; }
#top5-list li:last-child { border-bottom: none; }
.country-name { font-weight: bold; }
.price { color: green; font-weight: bold; margin-bottom: 5px; }
.dates { font-size: 14px; color: #444; max-height: 120px; overflow-y: auto; padding-left: 10px; }
.dates div { margin: 2px 0; }

/* Theme variables */
:root{
  --bg: #4f4f4f;
  --card: #f8f9fa;
  --text: #222222;
  --font-sans: 'Inter', system-ui, -apple-system, 'Segoe UI', Roboto, 'Helvetica Neue', Arial;
  --muted: #555f6a;
  --accent-1: #0d6efd; /* blue */
  --accent-2: #6610f2; /* purple */
  --header-gradient: linear-gradient(135deg,var(--accent-1) 0%, var(--accent-2) 100%);
  --shadow: 0 6px 18px rgba(13,110,253,0.12);
}
.theme-dark{
  --bg: #0b0d10;
  --card: #0f1418;
  --text: #e6eef8;
  --muted: #9aa6b2;
  --accent-1: #3b82f6;
  --accent-2: #7c3aed;
  --header-gradient: linear-gradient(135deg,var(--accent-1) 0%, var(--accent-2) 100%);
  --shadow: 0 6px 18px rgba(0,0,0,0.6);
}

/* Page layout */
html,body{height:100%;}
body { margin: 0; font-family: system-ui, -apple-system, 'Segoe UI', Roboto, 'Helvetica Neue', Arial; color: var(--text); background: var(--bg); transition: background .25s ease, color .25s ease; }
/* Use Inter font if available */
body { font-family: var(--font-sans); -webkit-font-smoothing: antialiased; -moz-osx-font-smoothing: grayscale; text-rendering: optimizeLegibility; }
td ul { list-style: none; margin: 0; padding: 0; }
td li { padding: 2px 0; }

/* Header / hero */
.site-header {
  background: var(--header-gradient);
  color: white;
  padding: 18px 20px;
  border-radius: 10px;
  box-shadow: var(--shadow);
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
}
.site-brand { display: flex; align-items: center; gap: 12px; }
.site-logo { width: 56px; height: 56px; background: rgba(255,255,255,0.12); border-radius: 12px; display: flex; align-items: center; justify-content: center; font-weight: 700; font-size: 22px; color: #fff; box-shadow: inset 0 -8px 18px rgba(0,0,0,0.06); }
.site-logo[href] { text-decoration: none; cursor: pointer; }
.site-logo[href]:focus { outline: 3px solid rgba(255,255,255,0.12); outline-offset: 2px; }
.site-title { font-size: 1.25rem; margin: 0; font-weight: 600; }
.site-title, h1, h2, h3 { font-weight: 700; letter-spacing: -0.02em; }
.site-sub { font-size: 0.9rem; opacity: 0.95; margin-top: 4px; }
.site-meta { font-size: 0.85rem; opacity: 0.95; color: rgba(255,255,255,0.95); }

.header-actions { display: flex; gap: 8px; align-items: center; }
.header-actions .btn { font-weight: 600; }
.btn { font-weight: 600; }
.theme-toggle { background: transparent; border: 1px solid rgba(255,255,255,0.18); color: #fff; padding: 6px 10px; border-radius: 8px; font-weight: 600; }
.theme-toggle[data-state="dark"]{ background: rgba(0,0,0,0.18); }

/* Table / cards adjustments for dark */
.table { background: transparent; color: var(--text); }
.table th, .table td { border-color: rgba(0,0,0,0.08); }
.theme-dark .table th, .theme-dark .table td { border-color: rgba(255,255,255,0.06); }
.table thead th { background: rgba(0,0,0,0.04); color: var(--text); }
.theme-dark .table thead th { background: rgba(255,255,255,0.04); }
.table-striped > tbody > tr:nth-of-type(odd) > * { background-color: rgba(255, 253, 253, 0.85); }
.theme-dark .table-striped > tbody > tr:nth-of-type(odd) > * { background-color: rgba(255,255,255,0.02); }
/* .table-hover tbody tr:hover > * { background-color: rgba(217, 197, 197, 0.889); } */
.theme-dark .table-hover tbody tr:hover > * { background-color: rgba(255,255,255,0.03); }

/* Small screens */
@media (max-width: 720px) {
  /* Compact header for small screens */
  body { margin: 8px; }
  .container { padding: 0 6px; }
  .site-header { flex-direction: column; align-items: stretch; padding: 12px; gap: 10px; }
  .header-actions { justify-content: flex-start; gap: 6px; flex-wrap: wrap; }
  .site-brand { gap: 10px; }
  .site-logo { width: 44px; height: 44px; font-size: 18px; }
  .site-title { font-size: 1.05rem; }
  .site-sub { font-size: 0.85rem; }
  .site-meta { font-size: 0.78rem; }
  .header-actions .btn { padding: 0.28rem 0.5rem; font-size: 0.85rem; }
  /* make action buttons more tappable and allow them to grow if space permits */
  .header-actions .btn { flex: 1 1 auto; min-width: 110px; }

  /* Table tweaks for mobile */
  .table thead th, .table td, .table th { font-size: 0.92rem; }
  .table-responsive { overflow-x: auto; -webkit-overflow-scrolling: touch; }
  .table-responsive .table { min-width: 680px; }
}

@media (max-width: 420px) {
  /* Very small screens: tighten further */
  .site-logo { width: 40px; height: 40px; font-size: 16px; }
  .site-title { font-size: 1rem; }
  .header-actions .btn { min-width: 90px; font-size: 0.82rem; }
  .table-responsive .table { min-width: 600px; }
}

/* Fix header wrapping for narrow tablets / large phones between 721px and 767px */
@media (min-width: 721px) and (max-width: 767px) {
  .site-header {
    padding: 14px 16px;
    gap: 10px;
  }
  .site-brand { gap: 10px; }
  .header-actions { gap: 8px; }
  /* Prevent buttons from stretching into multiple rows here */
  .header-actions .btn {
    flex: 0 0 auto;
    min-width: 88px;
    padding: 0.32rem 0.56rem;
    font-size: 0.9rem;
  }
  .container { padding: 0 10px; }

  .d-flex {
    display: block !important;
  }
}



.table thead th  {
  background-color: #380058;
  color: #f9f9f9;
}

.table{
  border-collapse: separate;
}

/* Responsive: turn each table column into a card on small screens */
@media (max-width: 992px) {
  .table { border: 0; }
  .table thead { display: none; }
  .table tbody, .table tr, .table td { display: block; width: 100%; }
  .table tr { margin: 0 0 12px 0; }
  .table td {
    background: var(--card);
    margin-bottom: 12px;
    padding: 12px;
    border-radius: 10px;
    box-shadow: 0 6px 14px rgba(0,0,0,0.04);
    border: none;
  }
  /* month label */
  .table td::before {
    content: attr(data-label);
    display: block;
    font-weight: 700;
    color: var(--text);
    margin-bottom: 8px;
    font-size: 0.98rem;
  }
  .table td ul { list-style: none; padding: 0; margin: 0; }
  .table td ul li {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 8px 0;
    border-bottom: 1px solid rgba(0,0,0,0.06);
  }
  .table td ul li:last-child { border-bottom: none; }
  .table td .label { color: var(--text); font-weight: 600; }
  .table td .value { font-weight: 700; color: var(--text); }
  /* keep lists readable */
  .table td ul li .meta { display:block; font-size:0.9rem; color:var(--muted); }
}

/* Price pill styles used when table -> card conversion applies */
.table td .value {
  font-weight: 700;
  display: inline-block;
  padding: 6px 10px;
  border-radius: 999px;
  min-width: 56px;
  text-align: right;
  box-shadow: 0 4px 10px rgba(0,0,0,0.06);
}
.table td .value.price-low { background: #10b981; color: #fff; }
.table td .value.price-mid { background: #f59e0b; color: #fff; }
.table td .value.price-high{ background: #ef4444; color: #fff; }

.table td ul li {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 8px 0;
    border-bottom: 1px solid rgba(0,0,0,0.06);
  }
/* Month grid and country list styles */
.months-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(260px, 1fr)); gap: 12px; }
.month-block { background: var(--card); padding: 10px; border-radius: 10px; box-shadow: 0 6px 18px rgba(0,0,0,0.04); }
.month-title { margin: 0 0 8px 0; font-size: 1rem; }
.country-list { list-style: none; padding: 0; margin: 0; display:flex; flex-direction:column; gap:8px; }
.country-item { display:flex; align-items:center; justify-content:space-between; gap:12px; padding: 8px; border-radius: 8px; background: transparent; }
.country-item .left { display:flex; gap:10px; align-items:center; }
.country-name { font-weight:700; }
.country-item .meta { font-size:0.88rem; color:var(--muted); }
.right { min-width:72px; text-align:right; }
.price-pill { display:inline-block; padding:6px 10px; border-radius:999px; font-weight:700; min-width:56px; text-align:center; box-shadow: 0 4px 10px rgba(0,0,0,0.06); }
.price-low { background: #10b981; color: white; }
.price-mid { background: #f59e0b; color: white; }
.price-high{ background: #ef4444; color: white; }

.big-popup div {
  scrollbar-width: thin;
  scrollbar-color: #666 #222;
  padding-right: 8px;          /* space for scrollbar */
  box-sizing: content-box;     /* ensure padding doesn't shrink text area */
}

/* Chrome, Edge, Safari */
.big-popup div::-webkit-scrollbar {
  width: 6px;
}

.big-popup div::-webkit-scrollbar-track {
  background: #222;
  border-radius: 10px;
}

.big-popup div::-webkit-scrollbar-thumb {
  background-color: #666;
  border-radius: 10px;
  border: 1px solid #333;
}

.big-popup div::-webkit-scrollbar-thumb:hover {
  background-color: #888;
}

