/* Töltőpontok publikus táblázat stílus */
.charger-table {
  width: 100%;
  border-collapse: separate;
  border-spacing: 0;
  margin: 32px 0 24px 0;
  background: #fff;
  box-shadow: 0 2px 12px rgba(24,49,54,0.07);
  border-radius: 12px;
  overflow: hidden;
}
.charger-table th, .charger-table td {
  border-bottom: 1px solid #e0e0b2;
  padding: 14px 20px;
  text-align: left;
  font-size: 1rem;
}
.charger-table th {
  background: #183136;
  color: #fff;
  font-weight: 500;
  letter-spacing: 0.5px;
}
.charger-table tr:last-child td {
  border-bottom: none;
}
.charger-table tr:nth-child(even) td {
  background: #f7f7f7;
}
/* Header menü flexbox elrendezés */
.header-menu {
  display: flex;
  gap: 12px;
  align-items: center;
  flex-wrap: wrap;
}

/* Desktop menü csak desktop nézetben */
.desktop-menu {
  display: flex;
  gap: 12px;
  align-items: center;
  flex-wrap: wrap;
}

/* Biztosítjuk, hogy a navigáció megfelelően pozicionálva legyen */
header {
  background: #183136;
  color: white;
  padding: 0;
  position: relative;
  z-index: 100;
  width: 100%;
  box-shadow: 0 2px 4px rgba(0,0,0,0.1);
}

/* Header felhasználói információk */
.header-user-info {
  background: rgba(255, 255, 255, 0.1);
  padding: 10px 20px;
  border-bottom: 1px solid rgba(255, 255, 255, 0.2);
  color: #fff;
  font-size: 14px;
  line-height: 1.4;
}

/* Új: user info a nav sávban */
.main-nav-with-user { display:flex; align-items:center; gap:14px; }
.main-nav-with-user .desktop-menu { flex-wrap:wrap; }
.nav-user-info { color:#fff; font-size:12px; line-height:1.3; background:rgba(255,255,255,0.12); padding:6px 10px; border-radius:8px; display:flex; align-items:center; gap:6px; max-width:240px; }
.nav-user-info span { white-space:nowrap; overflow:hidden; text-overflow:ellipsis; }
@media (max-width:900px){ .nav-user-info { display:none; } }

.header-user-info div {
  margin-bottom: 3px;
}

.header-user-info div:last-child {
  margin-bottom: 0;
}

header nav {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 16px 20px;
  min-height: 60px;
  position: relative;
  z-index: 1100; /* biztosan a Leaflet tile pane felett */
  /* Fix touch event positioning */
  transform: translateZ(0);
  will-change: auto;
}

.logo-container {
  display: flex;
  align-items: center;
}

.header-logo {
  height: 40px;
  vertical-align: middle;
}

/* Mobile menu toggle alapértelmezett rejtés */
.mobile-menu-toggle {
  display: none;
  background: none;
  border: none;
  color: white;
  font-size: 24px;
  cursor: pointer;
  padding: 8px;
  border-radius: 4px;
  transition: transform 0.2s ease;
}

/* Eszköz-specifikus szabályok PHP detektálás alapján */
.mobile-device .desktop-menu {
  display: none !important;
}

.mobile-device .mobile-menu-toggle {
  display: inline-flex !important;
}

.desktop-device .mobile-menu {
  display: none !important;
}

.desktop-device .mobile-menu-toggle {
  display: none !important;
}

.desktop-device .desktop-menu {
  display: flex !important;
}

html, body {
  height: 100%;
  margin: 0;
  padding: 0;
  overscroll-behavior-y: contain; /* reduce pull-to-refresh conflicts */
}
body {
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  font-family: 'Montserrat', sans-serif;
  background-color: #f5f5dc;
  color: #004d40;
  overscroll-behavior-y: contain;
}
main {
  flex: 1 0 auto;
}
footer {
  flex-shrink: 0;
}

header {
  background: #183136;
  color: white;
  padding: 0;
  position: relative;
  z-index: 100;
  width: 100%;
}

nav ul {
  list-style: none;
  display: flex;
  gap: 1em;
}

.hero {
  background-color: #004d40;
  color: white;
  padding: 3em;
  text-align: left;
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.hero .text {
  max-width: 50%;
}

/* Egységes gomb stílus minden .btn osztályra */
.btn {
  background-color: #f5f5dc;
  color: #004d40;
  padding: 0.75em 1.5em;
  border: none;
  border-radius: 8px;
  text-decoration: none;
  font-weight: 400;
  transition: background 0.2s, color 0.2s;
  display: inline-block;
}
.btn:hover {
  background-color: #e0e0b2;
  color: #183136;
}

/* Android app letöltési gomb */
.android-download-btn {
  background: linear-gradient(135deg, #4CAF50 0%, #45a049 100%) !important;
  color: white !important;
  border: 2px solid #388e3c;
  box-shadow: 0 2px 4px rgba(76, 175, 80, 0.3);
  font-weight: 600;
  position: relative;
  overflow: hidden;
}

.android-download-btn:hover {
  background: linear-gradient(135deg, #45a049 0%, #4CAF50 100%) !important;
  color: white !important;
  transform: translateY(-1px);
  box-shadow: 0 4px 8px rgba(76, 175, 80, 0.4);
}

.android-download-btn:active {
  transform: translateY(0);
  box-shadow: 0 2px 4px rgba(76, 175, 80, 0.3);
}

/* Message notification badge in header */
.message-badge {
  display: inline-block;
  background-color: #ff4757;
  color: white;
  font-size: 0.75rem;
  font-weight: 600;
  padding: 2px 6px;
  border-radius: 10px;
  margin-left: 6px;
  min-width: 18px;
  text-align: center;
  line-height: 1.2;
  vertical-align: middle;
  animation: pulse-badge 2s infinite;
}

@keyframes pulse-badge {
  0% { transform: scale(1); }
  50% { transform: scale(1.1); }
  100% { transform: scale(1); }
}

/* Mobil Android letöltési gomb */
.android-download-mobile {
  background: linear-gradient(135deg, #4CAF50 0%, #45a049 100%) !important;
  color: white !important;
  border: 2px solid #388e3c !important;
  box-shadow: 0 2px 4px rgba(76, 175, 80, 0.3);
  font-weight: 600 !important;
  margin-bottom: 8px;
  border-radius: 8px !important;
}

.android-download-mobile:hover {
  background: linear-gradient(135deg, #45a049 0%, #4CAF50 100%) !important;
  color: white !important;
  box-shadow: 0 4px 8px rgba(76, 175, 80, 0.4);
}

.features {
  padding: 2em;
  background-color: #ffffff;
}

.features h2 {
  color: #004d40;
}

.features ul {
  list-style: none;
  padding: 0;
}

.features li {
  margin-bottom: 1em;
  display: flex;
  align-items: center;
}

.features li::before {
  content: "⚡";
  margin-right: 0.5em;
  color: #004d40;
}
.image-center {
  display: flex;
  justify-content: center;
  align-items: center;
  padding: 40px 0;
  background-color: #183136;
}

.image-center img {
  max-width: 100%;
  height: auto;
  border-radius: 8px;
  box-shadow: 0 4px 12px rgba(0,0,0,0.1);
}

/* ========================================
   MOBILE RESPONSIVE DESIGN
   ======================================== */

/* Mobil navigáció stílusok */
.mobile-menu {
  background: #183136;
  position: absolute;
  top: 100%;
  left: 0;
  right: 0;
  z-index: 9999; /* Magasabb érték a Leaflet rétegek fölé */
  box-shadow: 0 4px 6px rgba(0, 0, 0, 0.1);
  border-top: 1px solid #2c5aa0;
  animation: slideDown 0.3s ease-out;
  /* Teljesítmény optimalizáció */
  will-change: transform, opacity;
  transform: translateZ(0); /* Hardware acceleration */
  backface-visibility: hidden;
}

@keyframes slideDown {
  from {
    opacity: 0;
    transform: translateY(-10px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

.mobile-menu-content {
  padding: 20px;
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.mobile-menu-item {
  background: rgba(255, 255, 255, 0.1);
  color: white !important;
  padding: 12px 16px;
  border-radius: 8px;
  text-decoration: none !important;
  font-weight: 500;
  font-size: 15px;
  transition: all 0.2s ease;
  border: 1px solid transparent;
  text-align: left;
  display: block;
  position: relative;
}

.mobile-menu-item:hover, .mobile-menu-item:focus {
  background: rgba(255, 255, 255, 0.2);
  border-color: rgba(255, 255, 255, 0.3);
  transform: translateX(5px);
}

.mobile-menu-item:active {
  transform: translateX(3px);
  background: rgba(255, 255, 255, 0.25);
}

/* Hamburger menü animáció */
.mobile-menu-toggle {
  transition: transform 0.2s ease;
  padding: 8px;
  border-radius: 4px;
}

.mobile-menu-toggle:hover {
  background: rgba(255, 255, 255, 0.1);
  transform: scale(1.1);
}

.mobile-menu-toggle:active {
  transform: scale(0.95);
}

/* Media query backup és pontosabb breakpoint-ok */
@media screen and (max-width: 767px) {
  .desktop-menu {
    display: none !important;
  }
  
  .mobile-menu-toggle {
    display: inline-flex !important;
  }
  
  header {
    position: relative;
    background: #183136 !important;
  }
  
  header nav {
    flex-direction: row !important;
    padding: 16px 20px !important;
    min-height: 60px !important;
    display: flex !important;
    align-items: center !important;
    justify-content: space-between !important;
  }
  
  /* Logo kisebb legyen mobilon */
  .header-logo {
    height: 36px !important;
  }
}

/* Desktop-on mobil menü elrejtése és desktop menü megjelenítése */
@media screen and (min-width: 768px) {
  .mobile-menu {
    display: none !important;
  }
  
  .mobile-menu-toggle {
    display: none !important;
  }
  
  .desktop-menu {
    display: flex !important;
    gap: 12px;
    align-items: center;
    flex-wrap: wrap;
  }
  
  header nav {
    display: flex !important;
    align-items: center !important;
    justify-content: space-between !important;
    padding: 16px 20px !important;
    min-height: 60px !important;
  }
  
  /* Hamburger menu javítása */
  .mobile-menu-toggle {
    background: none !important;
    border: none !important;
    color: white !important;
    font-size: 24px !important;
    cursor: pointer !important;
    padding: 8px !important;
    border-radius: 4px !important;
    z-index: 101 !important;
  }
}

/* Desktop-on mobil menü elrejtése */
@media screen and (min-width: 769px) {
  .mobile-menu {
    display: none !important;
  }
  
  .mobile-menu-toggle {
    display: none !important;
  }
  
  .desktop-menu {
    display: flex !important;
    gap: 12px;
    align-items: center;
    flex-wrap: wrap;
  }
  
  header nav {
    display: flex !important;
    align-items: center !important;
    justify-content: space-between !important;
    padding: 16px 20px !important;
    min-height: 60px !important;
  }
}

/* Touch optimalizáció */
@media (hover: none) and (pointer: coarse) {
  /* Prevent vertical browser refresh during horizontal interactions */
  .connector-slide-control { touch-action: pan-x; overscroll-behavior: contain; }
  .mobile-menu-item {
    min-height: 44px;
    display: flex;
    align-items: center;
  }
  
  .mobile-menu-toggle {
    min-width: 44px;
    min-height: 44px;
    display: flex;
    align-items: center;
    justify-content: center;
  }
}

/* Popup/modal close icon emphasis */
.modal-close, .close-btn, .fa-times, .fa-xmark {
  font-size: 150% !important;
  line-height: 1;
  cursor: pointer;
}

/* Alapértelmezett viewport meta tag támogatás */
@media screen and (max-width: 768px) {
  
  /* Logo nagyobb legyen mobilon */
  header nav img {
    height: 40px !important;
  }
  
  /* Header menu mobilra - desktop menü elrejtése */
  .header-menu.desktop-menu {
    display: none !important;
  }
  
  /* Hero szekció mobilra */
  .hero {
    padding: 20px !important;
    flex-direction: column !important;
    text-align: center !important;
    gap: 16px;
  }
  
  .hero div {
    flex-direction: column !important;
    gap: 12px !important;
    width: 100%;
  }
  
  .hero .btn {
    width: 100%;
    text-align: center;
    padding: 12px !important;
    font-size: 16px;
  }
  
  /* Főoldal kép mobilra */
  .image-center {
    padding: 20px 16px !important;
  }
  
  .image-center img {
    width: 100%;
    max-width: 400px;
  }
  
  /* Features szekció mobilra */
  .features {
    padding: 20px 16px !important;
  }
  
  .features h2 {
    font-size: 24px;
    text-align: center;
    margin-bottom: 20px;
  }
  
  .features li {
    font-size: 18px;
    margin-bottom: 16px;
    padding: 12px;
    background: #f9f9f9;
    border-radius: 8px;
    border-left: 4px solid #004d40;
  }
  
  /* Töltőpontok táblázat mobilra */
  .charger-table {
    font-size: 14px;
    margin: 16px 0;
  }
  
  .charger-table th,
  .charger-table td {
    padding: 8px 12px;
  }
  
  /* Túl hosszú cellák mobilon törjenek */
  .charger-table td {
    word-wrap: break-word;
    max-width: 150px;
  }
  
  /* Státusz oszlop mobilra */
  .charger-table .status {
    font-size: 12px;
    padding: 4px 8px;
  }
  
  /* Body általános mobilra */
  body {
    font-size: 16px;
    line-height: 1.5;
  }
  
  /* Űrlapok mobilra optimalizálva */
  input[type="text"],
  input[type="email"], 
  input[type="password"],
  select,
  textarea {
    width: 100% !important;
    padding: 12px !important;
    font-size: 16px !important; /* iOS zoom megakadályozása */
    border-radius: 8px;
    border: 2px solid #e0e0b2;
    box-sizing: border-box;
  }
  
  /* Gombok mobilra */
  button,
  .btn {
    min-height: 44px; /* Apple HIG minimum */
    font-size: 16px !important;
    padding: 12px 20px !important;
    border-radius: 8px;
    cursor: pointer;
  }
  
  /* Konténerek mobilra */
  .container {
    padding: 16px !important;
    margin: 16px 8px !important;
  }
  
  /* Táblázatok görgethetőek mobilon */
  .table-responsive {
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
  }
}

/* Tablet méret (768px - 1024px) */
@media screen and (min-width: 769px) and (max-width: 1024px) {
  
  .hero {
    padding: 32px;
  }
  
  .hero div {
    gap: 16px;
  }
  
  .hero .btn {
    padding: 10px 20px;
  }
  
  .features {
    padding: 32px;
  }
  
  .charger-table {
    font-size: 15px;
  }
  
  .header-menu {
    gap: 16px;
  }
}

/* Nagyon kis képernyők (320px alatt) */
@media screen and (max-width: 320px) {
  
  .hero .btn {
    font-size: 14px;
    padding: 10px 8px !important;
  }
  
  .features li {
    font-size: 16px;
  }
  
  .header-menu .btn {
    font-size: 12px;
    padding: 6px 8px !important;
  }
  
  header nav img {
    height: 32px !important;
  }
}

/* Landscape orientáció mobilon */
@media screen and (max-width: 768px) and (orientation: landscape) {
  
  .hero {
    padding: 16px !important;
  }
  
  .image-center {
    padding: 16px !important;
  }
  
  .image-center img {
    max-width: 300px;
    max-height: 200px;
  }
}

/* RFID Simulator specifikus stílusok */
.charger-card {
  cursor: pointer;
  transition: all 0.3s ease;
  position: relative;
}

.charger-card:hover {
  transform: translateY(-2px);
  box-shadow: 0 4px 20px rgba(0,77,64,0.2);
}

.charger-selected {
  border: 3px solid #004d40 !important;
  box-shadow: 0 0 15px rgba(0,77,64,0.4) !important;
  background: linear-gradient(135deg, #e8f5e8 0%, #ffffff 100%) !important;
}

.charger-distance {
  display: inline-block;
  margin-left: 8px;
  font-weight: bold;
  animation: pulse 2s infinite;
}

@keyframes pulse {
  0%, 100% { opacity: 1; }
  50% { opacity: 0.7; }
}

/* Kék gomb hover effekt */
.btn:hover {
  opacity: 0.9;
  transform: translateY(-1px);
}

/* Loading animáció javítása */
#loadingMessage {
  z-index: 1000;
  position: fixed;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  background: rgba(255, 255, 255, 0.95);
  padding: 20px;
  border-radius: 8px;
  box-shadow: 0 4px 20px rgba(0,0,0,0.2);
}
