@charset "UTF-8";

/* =============================
   1) RESET / BASE
   ============================= */
* { box-sizing: border-box; }
html, body { margin: 0; padding: 0; overflow-x: hidden; }
div { box-sizing: border-box; }


/* =============================
   2) LAYOUT (map + right panel)
   ============================= */
#map { height: 100vh; width: calc(100% - 25%); float: left; }
.center {
  position: absolute; top: 50%; left: 87.5%; transform: translate(-50%, -50%);
  width: 25%; height: 100%; background: #264057;
  display: flex; justify-content: center; align-items: center; padding-left: 0.07vw;
}


/* Weather widget */
.weather-container { flex: 1 0 auto; margin-left: 0 !important; width: auto; height: auto; background: transparent !important; }
.weather-icon { width: 50px; height: auto; }
.weather-attribution {    display: inline-block;   /* ✅ τυλίγει μόνο το περιεχόμενο */
  background: #5F6577 !important;
  font-size: 7px;
  margin-top: 2px;
  padding: 0 3px;
  color: rgba(255,255,255,0.7);
  text-align: left;
  white-space: nowrap;
  border-radius: 2px;
  align-self: flex-start;
  display:block;
  width:fit-content;
} 
.weather-attribution a { color: rgba(255,255,255,0.85); text-decoration: none; }
.weather-attribution a:hover { color: #fff; text-decoration: underline; }
.temperature { margin-top: 5%; font-size: 16px; color: #fff; }

.weather-icon,.weather-attribution { align-self: flex-start;  /* αναγκάζει αυτά τα δύο να πάνε αριστερά */}

/* =============================
   3) NOTIFICATION PANEL
   ============================= */
.notification-section {
  min-height: 100vh; display: flex; flex-direction: column; justify-content: flex-start; width: 95%;
  max-height: 100vh; padding-top: 1vh; padding-bottom: 1.2vh; transition: 0.3s transform;
  box-shadow: 10px 10px 21px 0 rgba(0,0,0,0.4);
}

/* Header */
.notification-section-header {
  display: flex; position: sticky; top: 0; z-index: 9999; justify-content: space-between; align-items: flex-start; flex-wrap: wrap;
  min-height: 50px; padding: 8px 2%; background: #1e3a5f; border-top-left-radius: 2%; border-top-right-radius: 2%;
}
.notification-section-header .menu { display: flex; align-items: center; padding-right: 5px; }
.notification-section-header .menu div { background: #B2DAFF; }
.notification-section-header .menu:hover div { background: #FFF; cursor: pointer; transition: 0.3s background; }
.notification-section-header .menu .line { width: 2.5vw; height: 0.38vh; border-radius: 5px; }
.notification-section-header .menu .line.first { margin-bottom: 8px; }
.notification-section-header .title { position: absolute; left: 50%; transform: translateX(-50%); font-weight: 600; font-size: 16px; color: #fff; white-space: nowrap; text-align: center; line-height: 1.2; width: 60%; overflow-wrap: break-word; word-break: break-word; }
.notification-section-header .title.no-weather { top: 12px; }

/* Content area */
.notification-section-content {
  flex: 1; display: flex; flex-direction: column; justify-content: flex-start; align-items: stretch; padding: 3% 3%;
  background: #FFF; border-bottom-left-radius: 2%; border-bottom-right-radius: 3px; position: relative; z-index: 1;
  scroll-padding-top: var(--header-height, 30px); overflow-y: auto; overflow-x: hidden; padding-top: inherit;
    overscroll-behavior-y: contain;  /* σταματά το scroll chaining προς γονείς */ overscroll-behavior-x: none; -webkit-overflow-scrolling: touch; /* momentum σε iOS */
  scrollbar-gutter: stable;/* αποφεύγει μικρο-τινάγματα από scrollbar εμφάνιση */  touch-action: pan-y;
}

.notification-section-content .line { position: absolute; top: 0; left: 25px; width: 2px; height: 100%; background: #EBEBEB; }

/* =============================
   4) CARD
   ============================= */
.notification-section-content .notification-card {
  position: relative; z-index: 1; line-height: 1.1rem; margin-bottom: 20px; opacity: 0; transition: 0.2s color, 0.3s transform;
}
.additional-content { margin-top: 10px; animation: fadeInExtra 0.4s ease-in-out; }

/* Dot / favicon circle */
.card-circle { width: 10px; height: 10px; background-color: #007bff; border-radius: 50%; }
.card-circle-container { width: 20px; height: 20px; margin-right: 10px; display: flex; align-items: center; justify-content: center; position: fixed; z-index: 2; /* να μην περνάει κάτω από περιεχόμενο */pointer-events: none; /* να μη μπλοκάρει κλικ */ }
.notification-section-content .notification-card .card-circle { position: absolute; top: 5px; width: 12px; height: 12px; background: #FFF; border: 2px solid #5F98CD; border-radius: 50%; color: rgba(0,0,0,0.6);  }

/* Card content */
.notification-section-content .notification-card .card-content { margin-left: 20px; }
.notification-section-content .notification-card .card-content .card-time { font-size: 10px; font-weight: 500; }

/* Title / sentence */
.card-sentence { margin: 0 0 4px 0; font-size: 15px; word-spacing: 1px; font-weight: bold; color: #000; display: block; }
/* Μην κάνεις underline/χρώμα στο p κατά το hover (το αναλαμβάνει το <a>) */
.card-sentence:hover { text-decoration: none !important; color: inherit !important; }

/* Link (τίτλος) */
a.clickable-sentence { text-decoration: none; color: inherit; }
/* Το <a> μέσα στο <p> να είναι inline ώστε η ημερομηνία να κάθεται δίπλα */
p.card-sentence > a.clickable-sentence, a.card-sentence { display: inline; width: auto; }
/* Hover μόνο στο link (ισχυρό για να υπερισχύει) */
p.card-sentence > a.clickable-sentence:hover,
a.card-sentence:hover,
a.clickable-sentence:hover {
  text-decoration-line: underline !important;
  text-decoration-thickness: 0.09em;
  text-underline-offset: 0.18em;
  text-decoration-color: currentColor;
  text-decoration-skip-ink: none; /* συνεχές underline χωρίς "κοψίματα" */
  color: darkblue !important;
}

/* Site name above the title */
.site-name { font-size: 15px; color: #007bff; margin-bottom: 5px; }
.site-favicon { width: 16px; height: 16px; border-radius: 4px; object-fit: contain; }

/* Extra items (Show more) */
.extra-item { margin-bottom: 12px; padding-left: 10px; border-left: 2px solid #5F98CD; opacity: 0; animation: fadeInExtra 0.3s ease-in forwards; }
.extra-sentence { margin: 0; font-size: 14px; color: #333; font-weight: 500; }
.extra-link { display: block; margin-top: 4px; font-size: 14px; color: #007bff; text-decoration: none; }

/* Row utility (if/when used) */
.sentence-row { display: flex; flex-wrap: wrap; align-items: center; gap: 6px; }

/* Date next to the title */
.notification-section-content .notification-card .card-content p.card-sentence > .pubdate { display: inline; white-space: nowrap; margin-left: 0; padding: 0; background: transparent; font-size: 0.85em; color: #6b7280; }
.notification-section-content .notification-card .card-content p.card-sentence > .pubdate::before { content: "–"; margin: 0 6px 0 8px; color: #9aa0a6; }

/* Show more button */
.show-more-button { display: block; margin-top: 10px; padding: 6px 14px; background-color: #5F98CD; color: #fff; border: none; border-radius: 20px; font-size: 13px; font-weight: 500; cursor: pointer; transition: background-color 0.3s ease, transform 0.2s ease; box-shadow: 0 2px 5px rgba(0,0,0,0.1); }
.show-more-button:hover { background-color: #4376A5; transform: scale(1.05); }

/* Optional link block elsewhere */
.card-link { display: block; margin-top: 5px; color: #007bff; text-decoration: none; }

/* =============================
   5) STATES (reduced to avoid cascade issues)
   ============================= */
/* Αφαιρέθηκε ο γενικός κανόνας που άλλαζε χρώμα σε όλο το card στο hover 
   για να μην επηρεάζει link/pubdate. Αν χρειαστεί, στόχευσε συγκεκριμένα elements. */

/* =============================
   6) ANIMATIONS / EFFECTS
   ============================= */
@keyframes fadeInExtra { from { opacity: 0; transform: translateY(10px); } to { opacity: 1; transform: translateY(0); } }
@keyframes raiseUpCard { from { transform: translateY(100%); opacity: 0; } to { transform: translateY(0); opacity: 1; } }
@-webkit-keyframes raiseUpCard { from { transform: translateY(100%); opacity: 0; } to { transform: translateY(0); opacity: 1; } }

/* Loading spinner */
.data-spinner-wrapper { padding: 10px; text-align: center; }
.spinner { border: 4px solid #f3f3f3; border-top: 4px solid #555; border-radius: 50%; width: 30px; height: 30px; animation: spin 1s linear infinite; margin: auto; }
@keyframes spin { 0% { transform: rotate(0deg); } 100% { transform: rotate(360deg); } }

/* =============================
   7) SIDE PANEL (icons fixed for editors)
   ============================= */
.notification-section-side { display: flex; flex-direction: column; justify-content: space-between; width: 152px; height: 270px; padding: 10px 0; border-top-left-radius: 3px; border-bottom-left-radius: 3px; background: #43627D; transform: translate3d(10%, -105%, -10px); transition: 0.3s transform; box-shadow: 10px 10px 21px 0 rgba(0,0,0,0.4); }
.notification-section-side .side-menu { width: 100%; padding: 15px 0 15px 15px; color: #91B0CB; font-size: 14px; font-weight: 500; transition: 0.3s background, 0.3s color; }

/* Use Font Awesome Free (fallback-friendly) with escaped unicodes */
.notification-section-side .side-menu:before {
  font-family: "Font Awesome 6 Free", "Font Awesome 5 Free";
  font-weight: 900; /* solid */
  display: inline-block; margin-right: 10px;
  -webkit-font-smoothing: antialiased; -moz-osx-font-smoothing: grayscale;
}
.notification-section-side .side-menu.dashboard:before   { content: "\f0e4"; } /* tachometer (dashboard) */
.notification-section-side .side-menu.profile:before     { content: "\f007"; } /* user */
.notification-section-side .side-menu.notifications:before{ content: "\f0f3"; } /* bell */
.notification-section-side .side-menu.messages:before    { content: "\f086"; } /* comments */
.notification-section-side .side-menu.settings:before    { content: "\f013"; } /* cog */

.notification-section.active { transform: translateX(140px); }
.notification-section.active .notification-section-side { transform: translate3d(-100%, -105%, -10px); }
.notification-section-side .side-menu:hover { background: #385269; color: #FFF; cursor: pointer; }



/* highlight cards */
/* animation για το flash */
/* “πλύσιμο” χρώματος που σβήνει */

/* === GOLD highlight με fade-out + underline sweep === */
/* Βασικό container κάρτας */
/* --- Background sweep από αριστερά προς δεξιά --- */
/* === GOLD highlight με ομαλό fade-out === */
/* απαλό glow που σβήνει */


/* Χρυσό-κίτρινο γέμισμα από αριστερά προς δεξιά με fade */
/* === GOLD-YELLOW fill + fade === */
/* === GOLD-YELLOW fast fill + longer fade === */
/* === GOLD-YELLOW super fast fill + slow fade === */
/* === GOLD super fast fill + slow fade === */
@keyframes cardGoldFillFade {
  0%   { background-size: 0% 100%; opacity: 0.95; }
  25%  { background-size: 100% 100%; opacity: 0.95; }
  100% { background-size: 100% 100%; opacity: 0; }
}

.notification-card.highlighted::after {
  content: "";
  position: absolute;
  inset: 0;
  border-radius: inherit;
  pointer-events: none;
  z-index: 1;

  background-image: linear-gradient(
    90deg,
    rgba(255, 215, 0, 0.35), /* #FFD700 πιο χρυσαφί */
    rgba(255, 215, 0, 0.35)
  );
  background-repeat: no-repeat;
  background-position: left center;
  background-size: 0% 100%;

  animation: cardGoldFillFade 2.2s ease-out forwards;
  will-change: background-size, opacity;
}

/* highlight cards  μεχρι εδω */

#load-more-wrap{
  padding: 12px 0 16px;
}

#load-more-btn.load-more-button{
  display: block;
  width: 100%;              /* γεμίζει όλο το πλάτος του panel */
  padding: 12px 0;
  background-color: #4376A5;
  color: #fff;
  font-size: 1em;
  font-weight: 600;
  border: none;
  border-radius: 6px;
  cursor: pointer;
  text-align: center;
  transition: background-color .2s ease, transform .06s ease;
}

#load-more-btn.load-more-button:hover{
  background-color: #365d82;   /* λίγο πιο σκούρο στο hover */
}

#load-more-btn.load-more-button:active{
  transform: scale(0.99);      /* μικρή «πίεση» στο click */
}

#load-more-btn.load-more-button:disabled{
  opacity: .6;
  cursor: default;
}



/* ελαφρύ bounce με glow – το pivot είναι στη βάση του pin */
/* το wrapper είναι αυτό που μετακινεί ο Leaflet */
/* ελαφρύ bounce με πιο δυνατό glow – το pivot είναι στη βάση του pin */
.marker-wrapper .marker-img,
.marker-wrapper .marker-dot {
  display: block;
  will-change: transform, filter;
}

/* πιο έντονο, πολλά μικρά bounces */
.marker-wrapper.bounce .marker-img,
.marker-wrapper.bounce .marker-dot {
  animation: markerBounce 0.8s ease-out 1;
  filter: drop-shadow(0 0 12px rgba(255, 215, 0, .95));
}

@keyframes markerBounce {
  0%   { transform: translateY(0) scale(1); }
  20%  { transform: translateY(-18px) scale(1.2); }
  40%  { transform: translateY(0) scale(1); }
  55%  { transform: translateY(-12px) scale(1.1); }
  70%  { transform: translateY(0) scale(1); }
  85%  { transform: translateY(-6px) scale(1.05); }
  100% { transform: translateY(0) scale(1); }
}

/* αν δεν έχεις εικόνα και θέλεις default dot */
.marker-dot {
  width: 18px;
  height: 18px;
  border-radius: 50%;
  background: #ffcc00;
  border: 2px solid #333;
}






/* ======= τεστ  ======= */


.notification-section.loading .weather-container, /* απο εδω να μην φενονται στο panel τα element του τιλου που φορτονουν */
.notification-section.loading .weather-icon,
.notification-section.loading .weather-attribution,
.notification-section.loading .temperature {
  display: none !important;
}

/* Ο τίτλος να κάτσει σωστά στο κέντρο όταν λείπει το weather */
.notification-section.loading .notification-section-header .title {
  top: 12px; /* ίδιο με το .no-weather */
} /* μεχρι εδω να μην φενονται στο panel τα element του τιλου που φορτονουν */




/* ======= Bottom sheet στο mobile ======= */ 
/* ======= Bottom sheet στο mobile ======= */
@media (max-width: 950px) {
  :root {
    --sheet-collapsed: 45dvh;
    --sheet-expanded: 90dvh;
    --sheet-radius: 16px;
    --sheet-z: 9998;
  }

  /* Χάρτης: πάντα πίσω, full viewport */
  #map {
    position: fixed;
    inset: 0;
    width: 100%;
    height: 100vh !important;
    z-index: 0;
    float: none;
    display: block;
  }
  @supports (height: 100dvh) {
    #map { height: 100dvh !important; }
  }

  /* Το wrapper δεν καλύπτει τον χάρτη */
  .center {
    position: static;
    width: 100%;
    left: auto; top: auto;
    transform: none !important;
    background: transparent !important;
    height: auto;
    overflow: visible;
  }

  /* (αν υπάρχει) κρύψε το side panel */
  .notification-section-side { display: none !important; }

  /* Bottom sheet (ακυρώνουμε τυχόν desktop min-height) */
  .notification-section {
    position: fixed;
    inset: auto 0 0 0;
    height: var(--sheet-collapsed);
    min-height: 0 !important;
    max-height: 95dvh;
    width: 100%;
    margin: 0;
    border-top-left-radius: var(--sheet-radius);
    border-top-right-radius: var(--sheet-radius);
    overflow: hidden;
    z-index: var(--sheet-z);
    display: flex;
    flex-direction: column;
    background: #1e3a5f;
    transition: height .2s ease;
    will-change: height;
  }
  .notification-section.expanded { height: var(--sheet-expanded); }

  /* -------- Header: καιρός | ΤΙΤΛΟΣ | θερμοκρασία (μία γραμμή) -------- */
 .notification-section-header {
  position: sticky; top: 0; z-index: 3;
  display: grid;
  grid-template-columns: minmax(0, auto) 1fr auto; /* αριστερά | τίτλος | δεξιά */
  align-items: center;
  gap: 8px 12px;
  padding: 16px 16px 12px;   /* λίγο χαμηλότερο top */
  min-height: 64px;
  border-top-left-radius: var(--sheet-radius);
  border-top-right-radius: var(--sheet-radius);
    touch-action: none;
  -ms-touch-action: none;
  -webkit-user-select: none;
  user-select: none;
  cursor: ns-resize;
}


  /* Grabber: μικρό ορατό pill, absolute για να ΜΗ μεγαλώνει το header */
  .notification-section-header .sheet-grabber {
    position: absolute;
    left: 50%;
    top: 6px;
    transform: translateX(-50%);
    width: 56px;
    height: 6px;
    border-radius: 999px;
    background: rgba(255,255,255,.75);
    box-shadow: 0 1px 0 rgba(0,0,0,.12) inset;

    /* drag-friendly */
    touch-action: none;
    cursor: ns-resize;
    -webkit-user-select: none;
    user-select: none;
    -webkit-tap-highlight-color: transparent;
  }

  /* Τίτλος στο κέντρο */
  /* Τίτλος στο grid κέντρο – override του desktop absolute */
/* mobile: τίτλος πάντα στο οπτικό κέντρο */
.notification-section-header .title,
.notification-section-header .title.no-weather {
  position: absolute !important;
  left: 50%;
  top: 50%;
  transform: translate(-50%, -50%) !important;

  /* άφησε περιθώριο για αριστερά/δεξιά στοιχεία */
  max-width: calc(100% - 160px); /* 80px από κάθε πλευρά, ρύθμισέ το αν χρειάζεται */
  width: auto;

  text-align: center;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;

  margin: 0;
  line-height: 1.2;
  color: #fff;

  pointer-events: none; /* να μην εμποδίζει το drag */
  z-index: 2;
}


  
  .notification-section-header .sheet-grabber::after {
  content: "";
  position: absolute;
  left: -120px; right: -120px;   /* πιο φαρδύ “δίχτυ” */
  top: -16px; bottom: -16px;     /* πιο ψηλό “δίχτυ” */
}
  
  

  /* Καιρός αριστερά */
  .notification-section-header .weather-container {
    grid-column: 1;
    justify-self: start;
    display: flex; align-items: center; gap: 6px;
    background: transparent !important;
    width: auto; height: auto; padding: 0;
  }
  .notification-section-header .weather-icon { width: 35px; height: auto; }

  /* Απόδωση καιρού: κρυφό όταν είναι κλειστό το sheet για να μη φουσκώνει */
  .notification-section:not(.expanded) .weather-attribution { display: none; }
  .notification-section.expanded .weather-attribution {
    background: rgba(95,101,119,.9) !important;
    font-size: 10px; margin: 0; padding: 0 4px; border-radius: 3px;
    color: rgba(255,255,255,.85);
  }
  
/* μόνο την ώρα του drag */
.notification-section.dragging,
.notification-section.dragging .notification-section-header,
.notification-section.dragging .sheet-grabber {
  touch-action: none;           /* iOS/Android: παραδίδει τα pointer/touch στη JS */
  -ms-touch-action: none;       /* παλιά Edge */
}

  

  /* Θερμοκρασία δεξιά */
  .notification-section-header .temperature {
    grid-column: 3;
    justify-self: end;
    margin: 0;
    font-size: 16px;
    color: #fff;
    white-space: nowrap;
  }

  /* Scroll area μέσα στο sheet */
  .notification-section-content {
    flex: 1 1 auto;
    min-height: 0;
    overflow-y: auto;
    overflow-x: hidden;
    padding: 3% 4%;
    padding-bottom: calc(env(safe-area-inset-bottom, 0px) + 24px);
    background: #FFF;
    border-bottom-left-radius: var(--sheet-radius);
    border-bottom-right-radius: var(--sheet-radius);
    overscroll-behavior: contain;
    -webkit-overflow-scrolling: touch;
    scrollbar-gutter: stable;
    touch-action: pan-y;
  }


/* αφήνουμε τα grid items να μικραίνουν (αλλιώς σπρώχνουν τον τίτλο) */
.notification-section-header .weather-container,
.notification-section-header .temperature {
  min-width: 0;
  position: relative;
  z-index: 3;
}

  /* Δεν χρειάζεται έξτρα buffer εδώ */
  .notification-section-content::after {
    content: ""; display: block; height: 0;
  }

  /* όσο σέρνεις, κόψε transition για άμεση απόκριση */
  .notification-section.dragging { transition: none !important; }

  /* Κλείδωσε το body όταν είναι ανοιχτό το sheet */
  body.sheet-open { overflow: hidden; height: 100dvh; }
}



