/* =====================================================
   EV-Ran Premium Charging UI
   ===================================================== */

:root {
  --bg:#050b14;
  --bg2:#081522;
  --card:rgba(14,28,45,.88);
  --border:rgba(255,255,255,.08);

  --accent:#00e5a8;
  --blue:#00b8ff;
  --green:#00e676;
  --danger:#ff453a;

  --text:#f5f7fa;
  --muted:#93a4b8;
}


body {
  background:
    radial-gradient(
      circle at top,
      rgba(0,229,168,.15),
      transparent 35%
    ),
    var(--bg);

  color:var(--text);
}


/* HEADER */

.evran-header {

  display:flex;
  align-items:center;
  padding:18px 18px;

  gap:12px;

}


.evran-back {

  color:white;
  font-size:32px;
  text-decoration:none;

}


.evran-brand {

 display:flex;
 align-items:center;
 gap:10px;

}


.evran-brand img {

 width:125px;
 height:auto;
 max-height:none;
 object-fit:contain;
 display:block;

}


.evran-brand-name {

 font-size:18px;
 font-weight:800;

}


.evran-brand-sub {

 font-size:9px;
 color:var(--muted);

}


.evran-live {

 margin-left:auto;

 background:rgba(0,229,168,.12);

 color:var(--accent);

 padding:7px 12px;

 border-radius:20px;

 font-size:11px;

 font-weight:700;

}


.live-dot {

 display:inline-block;

 width:7px;
 height:7px;

 border-radius:50%;

 background:var(--accent);

 margin-right:5px;

}


/* PAGE */

.evran-page {

 padding:10px 18px 30px;

}


/* CHARGER */

.evran-charger {

 text-align:center;

 margin-bottom:18px;

}


.charger-status {

 color:var(--accent);

 font-size:13px;

}


.status-pulse {

 display:inline-block;

 width:8px;
 height:8px;

 background:var(--accent);

 border-radius:50%;

 margin-right:5px;

}


.charger-name {

 margin-top:8px;

 font-size:20px;

 font-weight:800;

}


/* POWER */

.power-card {

 position:relative;

 overflow:hidden;

 background:linear-gradient(
  145deg,
  rgba(0,229,168,.12),
  rgba(0,184,255,.08)
 );

 border:1px solid var(--border);

 border-radius:28px;

 padding:32px 20px;

 text-align:center;

}


.power-card-glow {

 position:absolute;

 width:180px;
 height:180px;

 background:rgba(0,229,168,.2);

 filter:blur(60px);

 top:-50px;
 left:50%;

 transform:translateX(-50%);

}


.power-label {

 color:var(--muted);

 font-size:13px;

}


.power-value-row {

 display:flex;

 justify-content:center;

 align-items:end;

 gap:8px;

 margin-top:10px;

}


.power-value {

 font-size:58px;

 font-weight:900;

 letter-spacing:-2px;

}


.power-unit {

 font-size:18px;

 color:var(--muted);

 margin-bottom:10px;

}


.power-line {

 margin:20px auto;

 width:70%;

 height:2px;

 background:linear-gradient(
 90deg,
 transparent,
 var(--accent),
 transparent
 );

}


.charging-indicator {

 color:var(--accent);

 font-size:14px;

}


/* BATTERY */

.battery-card,
.billing-card,
.stat-card {

 background:var(--card);

 border:1px solid var(--border);

 border-radius:22px;

}


.battery-card {

 padding:20px;

 margin-top:16px;

}


.section-heading {

 display:flex;

 justify-content:space-between;

}


.section-title {

 font-weight:700;

}


.section-caption {

 font-size:12px;

 color:var(--muted);

}


.soc-number {

 font-size:26px;

 font-weight:900;

}


.battery-track {

 height:12px;

 background:#16283c;

 border-radius:20px;

 overflow:hidden;

 margin-top:18px;

}


.battery-fill {

 height:100%;

 background:linear-gradient(
 90deg,
 var(--green),
 var(--accent)
 );

 border-radius:20px;

}


.battery-footer {

 margin-top:10px;

 display:flex;

 justify-content:space-between;

 color:var(--muted);

 font-size:12px;

}


/* STATS */

.stats-grid {

 display:grid;

 grid-template-columns:1fr 1fr;

 gap:12px;

 margin-top:14px;

}


.stat-card {

 padding:18px;

 display:flex;

 gap:10px;

}


.stat-icon {

 font-size:24px;

}


.stat-label {

 color:var(--muted);

 font-size:12px;

}


.stat-value-row strong,
.stat-time {

 font-size:22px;

}


/* BILLING */

.billing-card {

 margin-top:14px;

 padding:20px;

}


.billing-header {

 display:flex;

 justify-content:space-between;

}


.billing-title {

 display:flex;

 gap:10px;

}


.billing-title small {

 display:block;

 color:var(--muted);

}


.rate-badge {

 color:var(--accent);

 font-size:11px;

}


.billing-main {

 margin-top:20px;

 display:flex;

 justify-content:space-between;

 align-items:center;

}


.billing-price strong {

 font-size:30px;

}


/* WALLET */

.wallet-card {

 margin-top:18px;

 padding:18px;

 background:rgba(0,229,168,.08);

 border:1px solid rgba(0,229,168,.2);

 border-radius:18px;

}


.wallet-top {

 display:flex;

 justify-content:space-between;

}


.wallet-balance-row {

 margin-top:10px;

}


.wallet-balance-row strong {

 font-size:30px;

}


.wallet-warning {

 color:#ffb74d;

}


/* STOP */

.evran-stop {

 width:100%;

 margin-top:20px;

 padding:17px;

 border-radius:18px;

 border:0;

 background:linear-gradient(
 135deg,
 #ff453a,
 #b91c1c
 );

 color:white;

 font-size:17px;

 font-weight:800;

}


.stop-hint {

 text-align:center;

 color:var(--muted);

 font-size:11px;

 margin-top:12px;

}


.evran-session-id {

 display:none;

}

/* =========================================================
   EV-Ran Typography Standard
   2026-09-03
   ========================================================= */

/* Bottom Navigation */
.evran-bottom .evran-nav-item{
    font-size:11px !important;
    gap:5px !important;
}

.evran-bottom .evran-nav-icon{
    font-size:20px !important;
    line-height:22px !important;
}

.evran-bottom .evran-nav-charge{
    font-size:27px !important;
}

/* General readable small text */
.evran-container small,
.evran-container .small,
.evran-container [class*="subtitle"],
.evran-container [class*="hint"],
.evran-container [class*="description"]{
    font-size:11px;
}

/* Form labels */
.evran-container label{
    font-size:12px;
}

/* Buttons */
.evran-container button,
.evran-container .btn{
    font-size:13px;
}

/* Cards */
.evran-container .card-title,
.evran-container [class*="card-title"]{
    font-size:14px;
}

/* Better mobile readability */
@media (max-width:480px){
    .evran-bottom .evran-nav-item{
        font-size:11px !important;
    }
}


/* =========================================================
   EV-Ran — Global Bottom Navigation Typography
   ========================================================= */

.evran-bottom .evran-nav-item,
.evran-bottom-inner .evran-nav-item{
    font-size:12px !important;
    line-height:1.35 !important;
    font-weight:500 !important;
    gap:5px !important;
}

.evran-bottom .evran-nav-item span:not(.evran-nav-charge),
.evran-bottom-inner .evran-nav-item span:not(.evran-nav-charge){
    font-size:12px !important;
    line-height:1.35 !important;
}

.evran-bottom .evran-nav-icon,
.evran-bottom-inner .evran-nav-icon{
    font-size:20px !important;
    line-height:22px !important;
}

.evran-bottom .evran-nav-charge,
.evran-bottom-inner .evran-nav-charge{
    font-size:27px !important;
}


/* =========================================================
   EV-RAN / MAPLIBRE FINAL INTERACTION FIX
   ========================================================= */

/* MapLibre charger markers must receive pointer events */
.maplibregl-marker.charger-marker-wrap {
  pointer-events: auto !important;
  z-index: 1700 !important;
  cursor: pointer !important;
}

.charger-marker-wrap {
  pointer-events: auto !important;
  cursor: pointer !important;
}

/* Floating location button */
.evran-map-locate {
  position: absolute !important;
  z-index: 1800 !important;
  right: 14px !important;
  top: 126px !important;
  width: 46px !important;
  height: 46px !important;
  padding: 0 !important;
  border: 1px solid rgba(255,255,255,.12) !important;
  border-radius: 14px !important;
  background: rgba(16,23,21,.94) !important;
  color: #20e58a !important;
  display: flex !important;
  align-items: center !important;
  justify-content: center !important;
  font-size: 25px !important;
  font-weight: 800 !important;
  line-height: 1 !important;
  box-shadow: 0 8px 24px rgba(0,0,0,.28) !important;
  cursor: pointer !important;
  pointer-events: auto !important;
  touch-action: manipulation !important;
}

/* Sheet must be above MapLibre canvas and markers */
.map-bottom-sheet {
  position: absolute !important;
  z-index: 2000 !important;
  pointer-events: none !important;
  opacity: 0;
  transform: translateY(110%);
  transition: transform .25s ease, opacity .25s ease;
}

.map-bottom-sheet.open {
  z-index: 2000 !important;
  pointer-events: auto !important;
  opacity: 1;
  transform: translateY(0);
}

/* MapLibre itself */
.maplibregl-map {
  position: absolute;
  inset: 0;
}


/* =========================================================
   EV-RAN SHEET READABILITY
   ========================================================= */

.map-bottom-sheet {
  background: #081522 !important;
  color: #f5f7fa !important;
  border-top: 1px solid rgba(255,255,255,.12) !important;
}

.map-bottom-sheet .sheet-charger-name {
  color: #f5f7fa !important;
}

.map-bottom-sheet .sheet-charger-addr {
  color: #aeb8c2 !important;
}

.map-bottom-sheet .map-popup-dist {
  color: #00e5a8 !important;
}

.map-bottom-sheet .sheet-connector-list {
  color: #f5f7fa !important;
}

.map-bottom-sheet .sheet-btn-nav {
  background: #00e5a8 !important;
  color: #04130b !important;
}

.map-bottom-sheet .sheet-handle {
  background: #53616d !important;
}


/* =========================================================
   EV-RAN PREMIUM CHARGER DETAIL SHEET V2
   ========================================================= */

.evran-sheet-header{
  display:flex;
  align-items:flex-start;
  justify-content:space-between;
  gap:14px;
  margin-bottom:16px;
}

.evran-sheet-close{
  width:38px;
  height:38px;
  border-radius:50%;
  border:1px solid rgba(255,255,255,.12);
  background:rgba(255,255,255,.06);
  color:#f5f7fa;
  font-size:24px;
  line-height:1;
  display:flex;
  align-items:center;
  justify-content:center;
  cursor:pointer;
  flex-shrink:0;
}

.evran-sheet-close:hover{
  background:rgba(255,255,255,.12);
}


.evran-sheet-title-wrap{
  min-width:0;
  flex:1;
}

.evran-sheet-title{
  color:#f5f7fa;
  font-size:18px;
  line-height:1.35;
  font-weight:800;
  margin-bottom:5px;
}

.evran-sheet-address{
  color:#aeb8c2;
  font-size:12px;
  line-height:1.5;
}

.evran-sheet-status{
  flex-shrink:0;
  display:flex;
  align-items:center;
  gap:6px;
  font-size:11px;
  font-weight:800;
  white-space:nowrap;
  padding:6px 9px;
  border-radius:10px;
  background:rgba(32,229,138,.08);
}

.evran-sheet-specs{
  display:grid;
  grid-template-columns:1fr 1fr;
  gap:10px;
  margin-bottom:18px;
}

.evran-sheet-spec{
  background:#0d1d2b;
  border:1px solid rgba(255,255,255,.08);
  border-radius:13px;
  padding:12px;
}

.evran-sheet-spec span{
  display:block;
  color:#8f9ca8;
  font-size:11px;
  margin-bottom:5px;
}

.evran-sheet-spec strong{
  display:block;
  color:#f5f7fa;
  font-size:14px;
  font-weight:800;
}

.evran-sheet-section-title{
  color:#f5f7fa;
  font-size:13px;
  font-weight:800;
  margin-bottom:9px;
}

.evran-sheet-connectors{
  display:flex;
  flex-direction:column;
  gap:8px;
}

.evran-connector-card{
  display:flex;
  align-items:center;
  justify-content:space-between;
  gap:10px;
  padding:11px;
  border-radius:13px;
  background:#0d1d2b;
  border:1px solid rgba(255,255,255,.07);
}

.evran-connector-main{
  display:flex;
  align-items:center;
  gap:10px;
  min-width:0;
}

.evran-connector-icon{
  width:36px;
  height:36px;
  flex-shrink:0;
  display:flex;
  align-items:center;
  justify-content:center;
  border-radius:10px;
  background:rgba(0,229,168,.10);
  color:#00e5a8;
  font-size:17px;
}

.evran-connector-info{
  min-width:0;
}

.evran-connector-title{
  color:#f5f7fa;
  font-size:13px;
  font-weight:800;
}

.evran-connector-sub{
  color:#8f9ca8;
  font-size:10px;
  margin-top:3px;
}

.evran-connector-right{
  display:flex;
  align-items:center;
  gap:8px;
  flex-shrink:0;
}

.evran-connector-status{
  display:flex;
  align-items:center;
  gap:5px;
  color:#aeb8c2;
  font-size:10px;
  font-weight:700;
}

.evran-sheet-start{
  display:inline-flex;
  align-items:center;
  justify-content:center;
  gap:6px;
  min-height:38px;
  padding:7px 12px;
  border:0;
  border-radius:9px;
  background:#00e5a8;
  color:#04130b !important;
  font-size:12px;
  font-weight:800;
  line-height:1;
  text-decoration:none !important;
  white-space:nowrap;
  font-family:inherit;
  cursor:pointer;
}

.evran-sheet-start .evran-qr-icon{
  display:inline-flex;
  align-items:center;
  justify-content:center;
  width:18px;
  height:18px;
  font-size:21px;
  font-weight:900;
  line-height:1;
}

.evran-sheet-actions{
  display:flex;
  margin-top:13px;
}

.evran-sheet-nav{
  width:100%;
  display:flex;
  align-items:center;
  justify-content:center;
  padding:11px;
  border-radius:11px;
  background:#162936;
  border:1px solid rgba(255,255,255,.08);
  color:#f5f7fa !important;
  text-decoration:none !important;
  font-size:12px;
  font-weight:800;
}

.evran-sheet-empty{
  padding:15px;
  border-radius:12px;
  background:#0d1d2b;
  color:#8f9ca8;
  text-align:center;
  font-size:12px;
}


.evran-sheet-start{
  direction:rtl !important;
}

.evran-sheet-start > span{
  direction:rtl !important;
  unicode-bidi:plaintext !important;
  text-align:right !important;
  display:inline-block;
}

.evran-site-title{
  color:#f5f7fa;
  font-size:15px;
  font-weight:800;
  margin:18px 0 12px;
}

.evran-site-grid{
  display:grid;
  grid-template-columns:1fr 1fr;
  gap:10px;
  margin-bottom:18px;
}

.evran-site-item{
  background:#102334;
  border:1px solid rgba(255,255,255,.08);
  border-radius:16px;
  padding:14px 10px;
  display:flex;
  flex-direction:column;
  align-items:center;
  justify-content:center;
  gap:8px;
  color:#f5f7fa;
  font-size:13px;
  font-weight:700;
}

.evran-site-item:first-line{
  font-size:22px;
}



.evran-site-hero{
  width:100%;
  height:170px;
  border-radius:22px;
  overflow:hidden;
  margin-bottom:16px;
  position:relative;
  background:#102334;
  border:1px solid rgba(255,255,255,.08);
}

.evran-site-hero img{
  width:100%;
  height:100%;
  object-fit:cover;
}

.evran-site-placeholder{
  display:flex;
  flex-direction:column;
  align-items:center;
  justify-content:center;
  gap:8px;
  color:#20e58a;
  font-weight:800;
  font-size:18px;
}

.evran-site-placeholder div{
  font-size:48px;
}


/* =========================================
   EV-Ran Site Gallery
   ========================================= */

.evran-gallery{
  position:relative;
  width:100%;
  height:170px;
  overflow:hidden;
  border-radius:22px;
  background:#102334;
  border:1px solid rgba(255,255,255,.08);
  isolation:isolate;
}

.evran-gallery-slide{
  position:absolute;
  inset:0;
  width:100%;
  height:100%;
  overflow:hidden;
}

.evran-gallery-slide img{
  display:block;
  width:100%;
  height:100%;
  object-fit:contain;
  object-position:center;
  background:#102334;
  padding:6px;
  box-sizing:border-box;
  user-select:none;
  -webkit-user-drag:none;
}

.evran-gallery-arrow{
  position:absolute;
  top:50%;
  z-index:5;
  width:38px;
  height:38px;
  margin:0;
  padding:0;
  transform:translateY(-50%);
  border:1px solid rgba(255,255,255,.18);
  border-radius:50%;
  background:rgba(0,0,0,.42);
  backdrop-filter:blur(8px);
  -webkit-backdrop-filter:blur(8px);
  color:#fff;
  font-size:30px;
  line-height:32px;
  font-family:Arial,sans-serif;
  display:flex;
  align-items:center;
  justify-content:center;
  cursor:pointer;
  transition:
    background .18s ease,
    transform .18s ease,
    border-color .18s ease;
}

.evran-gallery-arrow:hover{
  background:rgba(0,0,0,.62);
  border-color:rgba(32,229,138,.55);
}

.evran-gallery-arrow:active{
  transform:translateY(-50%) scale(.94);
}

.evran-gallery-prev{
  left:12px;
}

.evran-gallery-next{
  right:12px;
}

.evran-gallery-dots{
  position:absolute;
  z-index:6;
  left:50%;
  bottom:10px;
  transform:translateX(-50%);
  display:flex;
  align-items:center;
  justify-content:center;
  gap:6px;
  padding:5px 9px;
  border-radius:20px;
  background:rgba(0,0,0,.38);
  backdrop-filter:blur(8px);
  -webkit-backdrop-filter:blur(8px);
}

.evran-gallery-dot{
  width:7px;
  height:7px;
  margin:0;
  padding:0;
  border:0;
  border-radius:50%;
  background:rgba(255,255,255,.45);
  cursor:pointer;
  transition:
    width .18s ease,
    background .18s ease,
    transform .18s ease;
}

.evran-gallery-dot.active{
  width:18px;
  border-radius:10px;
  background:#20e58a;
}

.evran-gallery-dot:active{
  transform:scale(.9);
}

/* Keep the existing placeholder visually consistent. */
.evran-gallery + .evran-sheet-header{
  margin-top:0;
}

@media (max-width:480px){
  .evran-gallery{
    height:170px;
    border-radius:22px;
  }

  .evran-gallery-arrow{
    width:34px;
    height:34px;
    font-size:27px;
  }

  .evran-gallery-prev{
    left:9px;
  }

  .evran-gallery-next{
    right:9px;
  }

  .evran-gallery-dots{
    bottom:8px;
  }
}

