/* NSG Időpontfoglaló - Publikus Webes Stíluslap */
* {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

body {
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
  background-color: #f8fafc;
  color: #1e293b;
  line-height: 1.5;
  -webkit-font-smoothing: antialiased;
}

.container {
  max-width: 1280px;
  margin: 0 auto;
  padding: 0 16px;
}

/* 1. FEJLÉC (HEADER) */
.site-header {
  background: #ffffff;
  border-bottom: 1px solid #e2e8f0;
  box-shadow: 0 2px 4px rgba(0,0,0,0.04);
  position: sticky;
  top: 0;
  z-index: 100;
}

.header-inner {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 12px 0;
  flex-wrap: wrap;
  gap: 12px;
}

.header-brand {
  display: flex;
  align-items: center;
  text-decoration: none;
}

.header-logo {
  height: 48px;
  width: auto;
  max-width: 180px;
  object-fit: contain;
}

.header-contact {
  display: flex;
  align-items: center;
  gap: 12px;
  flex-wrap: wrap;
  text-align: right;
}

.contact-text {
  font-size: 13px;
  color: #475569;
  font-weight: 600;
}

.btn-phone {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  background: linear-gradient(135deg, #10b981 0%, #059669 100%);
  color: #ffffff !important;
  text-decoration: none !important;
  font-size: 15px;
  font-weight: 700;
  padding: 10px 18px;
  border-radius: 8px;
  box-shadow: 0 2px 6px rgba(16, 185, 129, 0.35);
  transition: all 0.2s ease;
}

.btn-phone:hover {
  background: linear-gradient(135deg, #059669 0%, #047857 100%);
  transform: translateY(-1px);
  box-shadow: 0 4px 10px rgba(16, 185, 129, 0.45);
}

.btn-phone i {
  font-size: 14px;
}

/* 2. NAVIGÁCIÓS SÁV (HÉT LAPOZÓ) */
.nav-card {
  background: #ffffff;
  border: 1px solid #e2e8f0;
  border-radius: 10px;
  padding: 14px 20px;
  margin: 20px 0 16px 0;
  box-shadow: 0 1px 3px rgba(0,0,0,0.05);
  display: flex;
  justify-content: space-between;
  align-items: center;
  flex-wrap: wrap;
  gap: 14px;
}

.nav-buttons {
  display: flex;
  align-items: center;
  gap: 8px;
}

.btn-nav {
  padding: 8px 14px;
  font-size: 13px;
  font-weight: 600;
  border-radius: 6px;
  border: 1px solid #cbd5e1;
  background: #ffffff;
  color: #334155;
  cursor: pointer;
  transition: all 0.15s ease;
  display: inline-flex;
  align-items: center;
  gap: 6px;
}

.btn-nav:hover:not(:disabled) {
  background: #f1f5f9;
  border-color: #94a3b8;
}

.btn-nav:disabled {
  opacity: 0.45;
  cursor: not-allowed;
  background: #f8fafc;
}

.btn-nav-today {
  background: #d946ef;
  border-color: #c026d3;
  color: #ffffff;
}

.btn-nav-today:hover:not(:disabled) {
  background: #c026d3;
  color: #ffffff;
}

.week-display {
  font-size: 16px;
  font-weight: 700;
  color: #0f172a;
  display: flex;
  align-items: center;
  gap: 8px;
}

.week-display i {
  color: #d946ef;
}

/* 3. MOBIL NAPVÁLASZTÓ FÜLEK (TABS) */
.mobile-day-tabs {
  display: none; /* Asztalon rejtve */
  margin-bottom: 14px;
  overflow-x: auto;
  white-space: nowrap;
  padding: 4px 2px 8px 2px;
  gap: 8px;
  -webkit-overflow-scrolling: touch;
}

.day-tab-btn {
  flex: 0 0 auto;
  padding: 10px 14px;
  border-radius: 8px;
  border: 1px solid #cbd5e1;
  background: #ffffff;
  font-size: 13px;
  font-weight: 700;
  color: #334155;
  cursor: pointer;
  text-align: center;
  min-width: 95px;
  transition: all 0.15s ease;
}

.day-tab-btn.active {
  background: #d946ef;
  border-color: #c026d3;
  color: #ffffff;
  box-shadow: 0 2px 6px rgba(217, 70, 239, 0.35);
}

.day-tab-btn.is-today {
  border-width: 2px;
}

.day-tab-btn .tab-date {
  font-size: 11px;
  font-weight: 500;
  display: block;
  opacity: 0.85;
  margin-top: 2px;
}

/* 4. NAPTÁR TÁBLÁZAT (ASZTALI ÉS MOBIL NÉZET) */
.calendar-card {
  background: #ffffff;
  border: 1px solid #e2e8f0;
  border-radius: 10px;
  overflow: hidden;
  box-shadow: 0 1px 3px rgba(0,0,0,0.05);
  margin-bottom: 30px;
}

/* Asztali nézet (alapértelmezetten látható, mobilon rejtve) */
.desktop-calendar-view {
  display: block;
  width: 100%;
}

/* Mobil nézet (alapértelmezetten rejtve, < 768px-nél látható) */
.mobile-calendar-view {
  display: none;
  width: 100%;
}

.mobile-day-panel {
  width: 100%;
}

.mobile-day-header {
  background: #f8fafc;
  padding: 10px 16px;
  border-bottom: 1px solid #e2e8f0;
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.mobile-day-header-title {
  font-size: 14px;
  font-weight: 700;
  color: #1e293b;
  display: flex;
  align-items: center;
  gap: 8px;
}

.mobile-day-header-title i {
  color: #d946ef;
}

.badge-today-pill {
  background: #d946ef;
  color: #ffffff;
  font-size: 10px;
  font-weight: 700;
  padding: 2px 7px;
  border-radius: 4px;
  margin-left: 6px;
}

/* Kifejezetten 3 oszlopos mobil naptár tábla */
.mobile-day-table {
  width: 100%;
  border-collapse: collapse;
  table-layout: fixed;
  font-size: 13px;
}

.mobile-day-table th,
.mobile-day-table td {
  border: 1px solid #e2e8f0;
  text-align: center;
  vertical-align: middle;
}

.mobile-day-table thead th {
  background: #f1f5f9;
  color: #1e293b;
  font-weight: 700;
  padding: 11px 4px;
  font-size: 13px;
}

.mobile-time-col {
  width: 22%;
  color: #475569;
}

.mobile-bay-col {
  width: 39%;
  color: #1e293b;
}

.mobile-time-cell {
  background: #f8fafc;
  color: #334155;
  font-weight: 700;
  font-size: 13px;
  padding: 6px 2px;
}

.calendar-table {
  width: 100%;
  border-collapse: collapse;
  table-layout: fixed;
  font-size: 13px;
}

.calendar-table th,
.calendar-table td {
  border: 1px solid #e2e8f0;
  text-align: center;
  vertical-align: middle;
}

.calendar-table thead th {
  background: #f8fafc;
  color: #1e293b;
  font-weight: 700;
  padding: 8px 4px;
}

.time-col-header {
  width: 65px;
  background: #f1f5f9 !important;
  color: #475569;
  font-size: 12px;
}

.time-cell {
  background: #f8fafc;
  color: #475569;
  font-weight: 700;
  font-size: 12px;
  width: 65px;
}

.day-col-header {
  padding: 10px 6px !important;
}

.day-col-header.is-today {
  background: #fdf4ff !important;
  border-bottom: 2px solid #d946ef !important;
}

.bay-subhead {
  font-size: 11px;
  font-weight: 600;
  color: #64748b;
  background: #ffffff !important;
  padding: 5px 2px !important;
}

/* 5. IDŐSÁV BADGE-EK (KÁRTYÁK) */
.slot-cell {
  height: 46px;
  padding: 2px;
}

/* A) SZABAD (Zöld, kattintható gombbal) */
.badge-free {
  height: 100%;
  min-height: 40px;
  border-radius: 6px;
  background: linear-gradient(135deg, #10b981 0%, #059669 100%);
  border: 1px solid #047857;
  color: #ffffff;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  cursor: pointer;
  user-select: none;
  box-shadow: 0 1px 2px rgba(0,0,0,0.06);
  transition: all 0.15s ease;
}

.badge-free:hover {
  background: linear-gradient(135deg, #059669 0%, #047857 100%);
  transform: translateY(-1px);
  box-shadow: 0 2px 5px rgba(0,0,0,0.15);
}

.badge-free .badge-icon {
  width: 18px;
  height: 18px;
  border-radius: 50%;
  background: #ffffff;
  color: #059669;
  font-size: 10px;
  font-weight: 900;
  display: inline-flex;
  align-items: center;
  justify-content: center;
}

.badge-free .badge-text {
  font-weight: 700;
  font-size: 11px;
  letter-spacing: 0.5px;
}

/* B) FOGLALT (Piros, letisztult kártya) */
.badge-booked {
  height: 100%;
  min-height: 40px;
  border-radius: 6px;
  background: #fee2e2;
  border: 1px solid #fca5a5;
  color: #b91c1c;
  display: flex;
  align-items: center;
  justify-content: center;
  font-weight: 700;
  font-size: 11px;
  user-select: none;
  cursor: not-allowed;
  gap: 5px;
}

.badge-booked .badge-icon {
  font-size: 11px;
  opacity: 0.8;
}

/* C) LEJÁRT / PASSZÍV (Egész világos zöld) */
.badge-expired {
  height: 100%;
  min-height: 40px;
  border-radius: 6px;
  background: linear-gradient(135deg, #ecfdf5 0%, #d1fae5 100%);
  border: 1px solid #a7f3d0;
  color: #059669;
  display: flex;
  align-items: center;
  justify-content: center;
  font-weight: 700;
  font-size: 11px;
  cursor: not-allowed;
  user-select: none;
  opacity: 0.95;
  gap: 5px;
}

.badge-expired .badge-icon {
  width: 18px;
  height: 18px;
  border-radius: 50%;
  background: #ffffff;
  color: #10b981;
  border: 1px solid #a7f3d0;
  font-size: 9px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
}

/* D) ZÁRT (Csíkos szürke háttér) */
.badge-closed {
  height: 100%;
  min-height: 40px;
  background: repeating-linear-gradient(45deg, #f8fafc, #f8fafc 10px, #f1f5f9 10px, #f1f5f9 20px);
  color: #94a3b8;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 11px;
  font-weight: 600;
  cursor: not-allowed;
  user-select: none;
}

/* 6. JELMAGYARÁZAT (LEGEND) */
.legend-card {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 20px;
  flex-wrap: wrap;
  padding: 12px 16px;
  background: #ffffff;
  border: 1px solid #e2e8f0;
  border-radius: 8px;
  margin-bottom: 25px;
  font-size: 12px;
  font-weight: 600;
  color: #475569;
}

.legend-item {
  display: inline-flex;
  align-items: center;
  gap: 6px;
}

.legend-pill {
  width: 16px;
  height: 16px;
  border-radius: 4px;
}

.pill-free { background: #10b981; }
.pill-booked { background: #ef4444; }
.pill-expired { background: #a7f3d0; border: 1px solid #34d399; }
.pill-closed { background: #e2e8f0; }

/* 7. FELUGRÓ ABLAK (MODAL) SZABAD IDŐPONTRA KATTINTÁSKOR */
.modal-overlay {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: rgba(15, 23, 42, 0.6);
  backdrop-filter: blur(2px);
  display: none;
  align-items: center;
  justify-content: center;
  z-index: 1000;
  padding: 16px;
}

.modal-content {
  background: #ffffff;
  border-radius: 12px;
  width: 100%;
  max-width: 440px;
  box-shadow: 0 20px 25px -5px rgba(0, 0, 0, 0.1), 0 10px 10px -5px rgba(0, 0, 0, 0.04);
  overflow: hidden;
  animation: modalSlideUp 0.2s ease-out;
}

@keyframes modalSlideUp {
  from { opacity: 0; transform: translateY(20px); }
  to { opacity: 1; transform: translateY(0); }
}

.modal-header {
  background: linear-gradient(135deg, #10b981 0%, #059669 100%);
  color: #ffffff;
  padding: 16px 20px;
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.modal-title {
  font-size: 16px;
  font-weight: 700;
  display: flex;
  align-items: center;
  gap: 8px;
}

.modal-close {
  background: transparent;
  border: none;
  color: #ffffff;
  font-size: 20px;
  cursor: pointer;
  opacity: 0.8;
  padding: 0 4px;
}

.modal-close:hover {
  opacity: 1;
}

.modal-body {
  padding: 20px;
  text-align: center;
}

.modal-slot-highlight {
  background: #f0fdf4;
  border: 1px solid #bbf7d0;
  border-radius: 8px;
  padding: 14px;
  margin-bottom: 16px;
}

.modal-slot-date {
  font-size: 15px;
  font-weight: 700;
  color: #065f46;
  margin-bottom: 4px;
}

.modal-slot-time {
  font-size: 24px;
  font-weight: 800;
  color: #047857;
}

.modal-prompt {
  font-size: 13px;
  color: #475569;
  margin-bottom: 20px;
}

.modal-call-btn {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  width: 100%;
  background: linear-gradient(135deg, #10b981 0%, #059669 100%);
  color: #ffffff !important;
  text-decoration: none !important;
  font-size: 18px;
  font-weight: 800;
  padding: 14px 20px;
  border-radius: 8px;
  box-shadow: 0 4px 12px rgba(16, 185, 129, 0.35);
  transition: all 0.15s ease;
  margin-bottom: 10px;
}

.modal-call-btn:hover {
  background: linear-gradient(135deg, #059669 0%, #047857 100%);
  transform: translateY(-1px);
}

.modal-cancel-btn {
  background: transparent;
  border: none;
  color: #64748b;
  font-size: 13px;
  font-weight: 600;
  cursor: pointer;
  padding: 8px 16px;
}

.modal-cancel-btn:hover {
  color: #0f172a;
}

/* 8. LÁBLÉC (FOOTER) */
.site-footer {
  text-align: center;
  padding: 24px 0 40px 0;
  font-size: 13px;
  color: #64748b;
  border-top: 1px solid #e2e8f0;
  margin-top: 20px;
}

/* 9. RESZPONZIVITÁS MOBILRA (< 768px) */
@media (max-width: 767px) {
  .header-inner {
    flex-direction: column;
    align-items: center;
    text-align: center;
    gap: 10px;
  }

  .header-contact {
    flex-direction: column;
    align-items: center;
    text-align: center;
    gap: 6px;
    width: 100%;
  }

  .btn-phone {
    width: 100%;
    justify-content: center;
    font-size: 16px;
    padding: 12px;
  }

  .nav-card {
    flex-direction: column;
    align-items: stretch;
    gap: 12px;
  }

  .nav-buttons {
    justify-content: space-between;
    width: 100%;
  }

  .week-display {
    justify-content: center;
    font-size: 15px;
  }

  /* Mobil nézetben megjelennek a napválasztó fülek */
  .mobile-day-tabs {
    display: flex;
  }

  /* Asztali nézet elrejtése, különálló 3 oszlopos mobil nézet megjelenítése */
  .desktop-calendar-view {
    display: none !important;
  }

  .mobile-calendar-view {
    display: block !important;
  }
}

