/* ─────────────────────────────────────────────────────────────────────────────
   WorkNow — Παράθυρα απόρριψης/ραντεβού και ημερολόγιο.
   Κοινό αρχείο για applications.html και my_applications.html, ώστε οι δύο
   πλευρές να δείχνουν το ίδιο πράγμα.
   ───────────────────────────────────────────────────────────────────────────── */

/* ── Παράθυρο ─────────────────────────────────────────────────────────────── */
.hx-overlay {
  position: fixed;
  inset: 0;
  background: rgba(18, 32, 47, 0.45);
  backdrop-filter: blur(2px);
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 1.5rem;
  z-index: 1200;
}

.hx-modal {
  background: #fff;
  border-radius: 14px;
  box-shadow: 0 24px 60px rgba(10, 30, 60, 0.28);
  width: 100%;
  max-width: 460px;
  max-height: 88vh;
  overflow-y: auto;
  padding: 1.6rem;
  font-family: 'Noto Sans', -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Arial, sans-serif;
}

.hx-modal.wide { max-width: 560px; }

.hx-title {
  font-size: 1.15rem;
  font-weight: 700;
  color: #2c3e50;
  margin: 0 0 0.35rem;
}

.hx-sub {
  font-size: 0.9rem;
  color: #6c757d;
  margin: 0 0 1.2rem;
  line-height: 1.5;
}

.hx-label {
  display: block;
  font-size: 0.78rem;
  font-weight: 700;
  letter-spacing: 0.03em;
  text-transform: uppercase;
  color: #7a8794;
  margin: 1.2rem 0 0.55rem;
}

.hx-label:first-of-type { margin-top: 0; }

.hx-actions {
  display: flex;
  gap: 0.7rem;
  margin-top: 1.5rem;
}

.hx-btn {
  flex: 1;
  padding: 0.75rem 1rem;
  border-radius: 8px;
  border: none;
  font-size: 0.95rem;
  font-weight: 600;
  cursor: pointer;
  font-family: inherit;
  transition: filter 0.15s, background 0.15s;
}

.hx-btn:disabled { opacity: 0.5; cursor: not-allowed; }
.hx-btn:not(:disabled):hover { filter: brightness(0.94); }
.hx-btn.primary { background: #1976d2; color: #fff; }
.hx-btn.danger { background: #d32f2f; color: #fff; }
.hx-btn.ghost { background: #eef1f5; color: #46566a; }

/* ── Επιλογές λόγου ───────────────────────────────────────────────────────── */
.hx-choice {
  display: flex;
  align-items: center;
  gap: 0.65rem;
  padding: 0.7rem 0.85rem;
  border: 1px solid #e3e8ee;
  border-radius: 9px;
  margin-bottom: 0.5rem;
  cursor: pointer;
  font-size: 0.93rem;
  color: #37474f;
}

.hx-choice:hover { border-color: #1976d2; background: #f7fbff; }
.hx-choice input { width: auto; margin: 0; accent-color: #1976d2; }
.hx-choice.is-picked { border-color: #1976d2; background: #f0f7ff; font-weight: 600; }

/* ── Ραντεβού: ημερολόγιο αριστερά, λίστα δεξιά ──────────────────────────── */
/* (applications.html, my_applications.html) Στο κινητό μία στήλη: με δύο, το
   ημερολόγιο έπαιρνε όλο το πλάτος και η λίστα έμενε σε στήλη πλάτους 0,
   με κάθε λέξη της να βγαίνει δεξιά από την οθόνη. */
.hx-iv-layout {
  display: grid;
  grid-template-columns: minmax(0, 320px) minmax(0, 1fr);
  gap: 1.5rem;
  align-items: start;
}

@media (max-width: 768px) {
  .hx-iv-layout { grid-template-columns: minmax(0, 1fr); }
}

/* ── Ημερολόγιο ───────────────────────────────────────────────────────────── */
.cal-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 0.7rem;
}

.cal-title { font-weight: 700; color: #2c3e50; font-size: 0.98rem; }

.cal-nav {
  border: 1px solid #e3e8ee;
  background: #fff;
  border-radius: 8px;
  width: 32px;
  height: 32px;
  font-size: 1.1rem;
  line-height: 1;
  color: #46566a;
  cursor: pointer;
}

.cal-nav:hover { background: #f2f6fa; }

.cal-grid {
  display: grid;
  grid-template-columns: repeat(7, 1fr);
  gap: 4px;
}

.cal-weekday {
  text-align: center;
  font-size: 0.72rem;
  font-weight: 700;
  color: #9aa8b5;
  padding-bottom: 0.3rem;
  text-transform: uppercase;
}

.cal-day {
  position: relative;
  aspect-ratio: 1;
  border: 1px solid transparent;
  border-radius: 8px;
  background: #f6f8fa;
  color: #37474f;
  font-size: 0.9rem;
  font-family: inherit;
  cursor: pointer;
}

.cal-day:not(:disabled):hover { background: #e6f0fb; border-color: #90c2f0; }
.cal-day:disabled { cursor: default; }
.cal-day.is-past { color: #c3ccd5; background: #fafbfc; }
.cal-day.is-today { border-color: #1976d2; font-weight: 700; }
.cal-day.is-selected { background: #1976d2; color: #fff; border-color: #1976d2; font-weight: 700; }

/* Κουκκίδα στις μέρες που έχουν ραντεβού. */
.cal-day.has-event::after {
  content: '';
  position: absolute;
  bottom: 5px;
  left: 50%;
  transform: translateX(-50%);
  width: 5px;
  height: 5px;
  border-radius: 50%;
  background: #2e7d32;
}

.cal-day.is-selected.has-event::after { background: #fff; }

/* Ημερολόγιο μόνο για ανάγνωση: οι μέρες δεν είναι disabled (τα disabled
   κουμπιά δεν στέλνουν γεγονότα ποντικιού, άρα δεν θα έβγαινε ποτέ popup),
   οπότε τους αφαιρούμε εδώ τη συμπεριφορά κουμπιού. */
.cal-day.is-static { cursor: default; }
.cal-day.is-static:hover { background: #f6f8fa; border-color: transparent; }

/* Οι μέρες με ραντεβού παραμένουν «ζωντανές»: δείχνουν ότι κρύβουν κάτι. */
.cal-day.is-static.has-event { cursor: help; }

.cal-day.is-static.has-event:hover,
.cal-day.is-static.has-event:focus-visible {
  background: #e6f0fb;
  border-color: #90c2f0;
  outline: none;
}

/* ── Popup λεπτομερειών ημέρας ────────────────────────────────────────────── */
.cal-popup {
  position: fixed;
  z-index: 1400;
  max-width: 320px;
  min-width: 220px;
  background: #ffffff;
  border: 1px solid #dfe6ee;
  border-radius: 12px;
  box-shadow: 0 12px 32px rgba(15, 40, 70, 0.18);
  padding: 0.75rem 0.85rem;
  font-family: 'Noto Sans', -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Arial, sans-serif;
  font-size: 0.86rem;
  color: #37474f;
  pointer-events: none;
  line-height: 1.45;
}

.cal-popup-head {
  font-weight: 700;
  color: #17293b;
  font-size: 0.82rem;
  text-transform: capitalize;
  padding-bottom: 0.5rem;
  margin-bottom: 0.5rem;
  border-bottom: 1px solid #eef2f6;
}

.cal-popup-row {
  display: grid;
  grid-template-columns: auto minmax(0, 1fr);
  gap: 0.6rem;
  align-items: start;
}

.cal-popup-row + .cal-popup-row {
  margin-top: 0.6rem;
  padding-top: 0.6rem;
  border-top: 1px dashed #eef2f6;
}

.cal-popup-time {
  font-weight: 700;
  color: #1a5aa8;
  background: #eef5fd;
  border-radius: 6px;
  padding: 0.1rem 0.4rem;
  white-space: nowrap;
  font-size: 0.82rem;
}

.cal-popup-body { display: grid; gap: 0.15rem; min-width: 0; }
.cal-popup-title { font-weight: 600; color: #2c3e50; }
.cal-popup-sub { color: #6c757d; font-size: 0.82rem; }

.cal-popup-status {
  justify-self: start;
  font-size: 0.74rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.02em;
  color: #7a5b00;
  background: #fff8e1;
  border-radius: 20px;
  padding: 0.1rem 0.5rem;
  margin-top: 0.15rem;
}

.cal-popup-status.is-accepted { color: #1b5e20; background: #e8f5e9; }

.cal-popup-note {
  color: #78909c;
  font-size: 0.8rem;
  font-style: italic;
  margin-top: 0.15rem;
}

/* ── Ώρες ─────────────────────────────────────────────────────────────────── */
.hx-slots {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(74px, 1fr));
  gap: 6px;
  max-height: 168px;
  overflow-y: auto;
  padding-right: 2px;
}

.hx-slot {
  padding: 0.5rem 0.2rem;
  border: 1px solid #e3e8ee;
  border-radius: 7px;
  background: #fff;
  font-size: 0.86rem;
  font-family: inherit;
  color: #37474f;
  cursor: pointer;
}

.hx-slot:not(:disabled):hover { border-color: #1976d2; background: #f7fbff; }

/* Ώρα που έχει ήδη περάσει: φαίνεται, αλλά δεν επιλέγεται. */
.hx-slot:disabled {
  color: #c3ccd5;
  background: #fafbfc;
  cursor: not-allowed;
}
.hx-slot.is-picked { background: #1976d2; color: #fff; border-color: #1976d2; font-weight: 700; }

.hx-note {
  width: 100%;
  border: 1px solid #dee2e6;
  border-radius: 8px;
  padding: 0.6rem;
  font-family: inherit;
  font-size: 0.92rem;
  min-height: 62px;
  resize: vertical;
  box-sizing: border-box;
}

.hx-error {
  color: #c62828;
  font-size: 0.87rem;
  margin-top: 0.8rem;
  min-height: 1em;
}

/* ── Πλαίσιο ραντεβού μέσα σε κάρτα αίτησης ──────────────────────────────── */
.iv-box {
  margin-top: 0.9rem;
  padding: 0.8rem 0.9rem;
  border-radius: 10px;
  border: 1px solid #cfe3f7;
  background: #f4f9ff;
  font-size: 0.9rem;
  color: #2c3e50;
}

.iv-box.accepted { border-color: #cfe8d1; background: #f2fbf3; }
.iv-box .iv-when { font-weight: 700; margin-top: 0.15rem; }
.iv-box .iv-label {
  font-size: 0.72rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.03em;
  color: #78909c;
}

.iv-box .iv-actions { display: flex; gap: 0.5rem; margin-top: 0.7rem; }

.iv-box .iv-actions .hx-btn { padding: 0.5rem 0.8rem; font-size: 0.86rem; }

/* Ο λόγος απόρριψης όπως τον βλέπει ο υποψήφιος. */
.reason-box {
  margin-top: 0.7rem;
  padding: 0.7rem 0.85rem;
  border-left: 3px solid #90a4ae;
  background: #f5f7fa;
  border-radius: 4px;
  font-size: 0.9rem;
  color: #37474f;
}

.reason-box .iv-label { display: block; margin-bottom: 0.15rem; }
