/* ===========================================================
   eMobility Directory — green-themed directory UI
   =========================================================== */
.emd-dir, .emd-dir *, .emd-dir *::before, .emd-dir *::after,
.emd-modal-overlay *, .emd-modal-overlay *::before { box-sizing: border-box; }

.emd-dir {
  --emd-green:#2E9B4E; --emd-green-dark:#1e7a3a; --emd-green-light:#e8f5ec; --emd-green-mid:#5DCAA5;
  --emd-gold:#EF9F27; --emd-gold-pale:#FAEEDA; --emd-gold-dark:#633806;
  --emd-blue:#185FA5; --emd-blue-pale:#E6F1FB;
  --emd-text:#1a1a1a; --emd-muted:#6b6b6b; --emd-faint:#9a9a9a;
  --emd-surface:#fff; --emd-bg:#f5f5f3; --emd-radius:8px; --emd-radius-lg:12px;
  font-family:-apple-system,BlinkMacSystemFont,'Segoe UI',Helvetica,Arial,sans-serif;
  font-size:14px; line-height:1.5; color:var(--emd-text);
}

/* ---------- Hero ---------- */
.emd-hero{ background:var(--emd-green); border-radius:var(--emd-radius-lg); padding:32px 28px; margin-bottom:14px; }
.emd-hero-inner{ display:flex; justify-content:space-between; align-items:flex-end; gap:24px; flex-wrap:wrap; }
.emd-eyebrow{ font-size:11px; font-weight:700; color:rgba(255,255,255,.7); letter-spacing:.12em; text-transform:uppercase; margin-bottom:10px; }
.emd-hero-title{ font-size:26px; font-weight:800; color:#fff !important; line-height:1.2; margin:0 0 10px; }
.emd-hero-title span{ color:rgba(255,255,255,.75) !important; font-weight:600; font-size:19px; display:block; }
.emd-hero-sub{ font-size:14px; color:rgba(255,255,255,.72); max-width:520px; line-height:1.6; margin:0 0 20px; }
.emd-hero-cta{ display:flex; gap:10px; flex-wrap:wrap; }
.emd-btn-white{ background:#fff; color:var(--emd-green); border:none; font-size:13px; font-weight:700; padding:11px 20px; border-radius:var(--emd-radius); cursor:pointer; transition:background .15s; }
.emd-btn-white:hover{ background:#f0f0f0; }
.emd-hero-stats{ display:flex; gap:26px; flex-wrap:wrap; }
.emd-stat{ text-align:center; }
.emd-stat-num{ font-size:24px; font-weight:800; color:#fff; line-height:1; }
.emd-stat-label{ font-size:11px; color:rgba(255,255,255,.6); margin-top:4px; }

/* ---------- Plans bar ---------- */
.emd-plans-bar{ background:#fff; border:1px solid #e8e8e8; border-radius:var(--emd-radius); padding:12px 16px; display:flex; align-items:center; gap:12px; flex-wrap:wrap; margin-bottom:12px; }
.emd-plans-label{ font-size:12px; color:var(--emd-muted); white-space:nowrap; }
.emd-plan-pill{ font-size:12px; font-weight:600; padding:7px 14px; border-radius:20px; border:1px solid rgba(0,0,0,.18); color:var(--emd-muted); background:var(--emd-bg); line-height:1.4; }
.emd-plan-pill strong{ display:block; color:var(--emd-text); font-size:12px; }
.emd-plan-pill small{ font-size:11px; font-weight:400; }
.emd-plan-pill.gold{ background:var(--emd-gold-pale); color:var(--emd-gold-dark); border-color:var(--emd-gold); }
.emd-plan-pill.gold strong{ color:var(--emd-gold-dark); }

/* ---------- Search bar ---------- */
.emd-searchbar{ background:#fff; border:1px solid #e8e8e8; border-radius:var(--emd-radius); padding:12px 16px; display:flex; gap:8px; align-items:center; flex-wrap:wrap; margin-bottom:18px; }
.emd-search-wrap{ flex:1; min-width:180px; position:relative; display:flex; align-items:center; }
.emd-search-wrap svg{ position:absolute; left:11px; color:#aaa; pointer-events:none; }
.emd-search-input{ width:100%; border:1px solid rgba(0,0,0,.18); border-radius:var(--emd-radius); padding:9px 12px 9px 34px; font-size:13px; background:var(--emd-bg); color:var(--emd-text); outline:none; transition:border-color .15s; }
.emd-search-input:focus{ border-color:var(--emd-green); background:#fff; }
.emd-filter-select{ border:1px solid rgba(0,0,0,.18); border-radius:var(--emd-radius); padding:9px 12px; font-size:12px; background:var(--emd-bg); color:var(--emd-muted); outline:none; cursor:pointer; min-width:150px; max-width:220px; }
.emd-filter-btn{ background:var(--emd-green); color:#fff; border:none; font-size:12px; font-weight:700; padding:9px 20px; border-radius:var(--emd-radius); cursor:pointer; transition:background .15s; white-space:nowrap; }
.emd-filter-btn:hover{ background:var(--emd-green-dark); }
.emd-filter-clear{ font-size:12px; color:var(--emd-muted); text-decoration:none; align-self:center; }
.emd-filter-clear:hover{ color:var(--emd-text); text-decoration:underline; }

/* ---------- Layout ---------- */
.emd-main{ display:grid; grid-template-columns:1fr 280px; gap:24px; align-items:start; }
.emd-results-meta{ font-size:12px; color:var(--emd-muted); margin-bottom:12px; }
.emd-results-meta strong{ color:var(--emd-text); }
.emd-listing-list{ display:flex; flex-direction:column; gap:10px; }

/* ---------- Listing cards ---------- */
.emd-listing-card{ background:var(--emd-surface); border:1px solid #e0e0e0; border-radius:var(--emd-radius-lg); padding:16px 18px; display:flex; gap:14px; align-items:flex-start; transition:border-color .15s, box-shadow .15s; }
.emd-listing-card:hover{ border-color:var(--emd-green); box-shadow:0 2px 10px rgba(46,155,78,.08); }
.emd-listing-card.is-premium{ border:2px solid var(--emd-gold); box-shadow:0 0 0 1px rgba(239,159,39,.18); }
.emd-listing-card.is-premium:hover{ box-shadow:0 2px 12px rgba(239,159,39,.25); }

.emd-company-logo{ width:54px; height:54px; border-radius:var(--emd-radius); background:var(--emd-bg); border:1px solid #e0e0e0; display:flex; align-items:center; justify-content:center; flex-shrink:0; overflow:hidden; font-size:14px; font-weight:700; color:var(--emd-muted); }
.emd-company-logo img{ width:100%; height:100%; object-fit:contain; padding:6px; }
.is-premium .emd-company-logo{ border-color:var(--emd-gold); background:var(--emd-gold-pale); color:var(--emd-gold-dark); }

.emd-listing-body{ flex:1; min-width:0; }
.emd-listing-header{ display:flex; align-items:center; gap:8px; margin-bottom:5px; flex-wrap:wrap; }
.emd-company-name{ font-size:15px; font-weight:700; color:var(--emd-text); }
.emd-premium-badge{ background:var(--emd-gold-pale); color:var(--emd-gold-dark); font-size:10px; font-weight:700; padding:2px 9px; border-radius:20px; border:1px solid var(--emd-gold); display:inline-flex; align-items:center; gap:4px; white-space:nowrap; }
.emd-listing-desc{ font-size:13px; color:var(--emd-muted); margin:0 0 10px; line-height:1.55; }
.emd-listing-meta{ display:flex; gap:8px; flex-wrap:wrap; align-items:center; }
.emd-tag{ font-size:11px; color:var(--emd-blue); background:var(--emd-blue-pale); padding:3px 9px; border-radius:4px; font-weight:600; }
.emd-country{ font-size:11px; color:var(--emd-faint); display:inline-flex; align-items:center; gap:4px; }

.emd-listing-actions{ display:flex; flex-direction:column; gap:6px; align-items:flex-end; flex-shrink:0; }
.emd-action-btn{ font-size:11px; color:var(--emd-muted); border:1px solid #ddd; background:var(--emd-bg); padding:6px 12px; border-radius:6px; cursor:pointer; display:inline-flex; align-items:center; gap:5px; white-space:nowrap; text-decoration:none; transition:background .12s; }
.emd-action-btn:hover{ background:#eee; }
.emd-action-btn.primary{ background:var(--emd-green-light); color:var(--emd-green-dark); border-color:var(--emd-green); font-weight:600; }
.emd-action-btn.primary:hover{ background:#d0ecd8; }

/* ---------- Pagination ---------- */
.emd-pagination{ margin-top:24px; display:flex; gap:6px; flex-wrap:wrap; }
.emd-pagination a, .emd-pagination span{ min-width:36px; height:36px; display:inline-flex; align-items:center; justify-content:center; padding:0 11px; border:1px solid #e0e0e0; border-radius:6px; text-decoration:none; color:var(--emd-text); font-weight:600; font-size:13px; background:#fff; transition:.15s; }
.emd-pagination a:hover{ border-color:var(--emd-green); color:var(--emd-green); }
.emd-pagination .current{ background:var(--emd-green); color:#fff; border-color:var(--emd-green); }
.emd-empty{ padding:36px; text-align:center; color:var(--emd-muted); background:var(--emd-bg); border-radius:var(--emd-radius-lg); }

/* ---------- Sidebar ---------- */
.emd-sidebar{ display:flex; flex-direction:column; gap:16px; }
.emd-side-card{ background:var(--emd-surface); border:1px solid #e0e0e0; border-radius:var(--emd-radius-lg); padding:16px 18px; }
.emd-side-title{ font-size:11px; font-weight:700; color:var(--emd-muted); margin-bottom:12px; text-transform:uppercase; letter-spacing:.07em; border-bottom:2px solid var(--emd-green); padding-bottom:8px; display:inline-block; }

.emd-upgrade-card{ background:var(--emd-green); border:none; }
.emd-upgrade-icon{ font-size:22px; color:#fff; margin-bottom:10px; opacity:.9; }
.emd-upgrade-title{ font-size:14px; font-weight:800; color:#fff; margin-bottom:6px; text-transform:uppercase; letter-spacing:.02em; }
.emd-upgrade-sub{ font-size:12px; color:rgba(255,255,255,.72); margin-bottom:16px; line-height:1.5; }
.emd-upgrade-features{ margin-bottom:16px; }
.emd-upgrade-feature{ display:flex; align-items:center; gap:8px; font-size:12px; color:rgba(255,255,255,.88); margin-bottom:7px; }
.emd-upgrade-feature .emd-check{ color:#fff; font-weight:700; }
.emd-upgrade-price{ font-size:11px; color:rgba(255,255,255,.6); margin-bottom:12px; }
.emd-upgrade-price strong{ font-size:20px; font-weight:800; color:#fff; }
.emd-btn-upgrade{ display:block; width:100%; text-align:center; background:#fff; color:var(--emd-green); border:none; font-size:13px; font-weight:700; padding:10px; border-radius:var(--emd-radius); cursor:pointer; transition:background .15s; }
.emd-btn-upgrade:hover{ background:#f0f0f0; }

.emd-category-list{ list-style:none; margin:0; padding:0; }
.emd-category-list li{ display:flex; justify-content:space-between; align-items:center; padding:8px 0; border-bottom:1px solid #f0f0f0; font-size:12px; }
.emd-category-list li:last-child{ border-bottom:none; }
.emd-category-list li a{ color:var(--emd-muted); text-decoration:none; transition:color .12s; }
.emd-category-list li a:hover{ color:var(--emd-green); }
.emd-cat-count{ background:var(--emd-green-light); border-radius:4px; padding:1px 7px; font-size:10px; color:var(--emd-green-dark); font-weight:600; }

.emd-side-add{ border:2px solid var(--emd-green); text-align:center; }
.emd-side-add-title{ font-size:13px; font-weight:700; color:var(--emd-text); margin-bottom:6px; }
.emd-side-add-sub{ font-size:12px; color:var(--emd-muted); margin-bottom:14px; line-height:1.5; }
.emd-btn-add-full{ width:100%; background:var(--emd-green); color:#fff; border:none; font-size:12px; font-weight:700; padding:9px; border-radius:var(--emd-radius); cursor:pointer; transition:background .15s; }
.emd-btn-add-full:hover{ background:var(--emd-green-dark); }

@media (max-width:800px){
  .emd-main{ grid-template-columns:1fr; }
  .emd-sidebar{ order:0; }
  .emd-hero-title{ font-size:21px; }
}

/* ===========================================================
   Manage panel (token link)
   =========================================================== */
.emd-manage{ max-width:620px; margin:0 auto; font-family:-apple-system,BlinkMacSystemFont,'Segoe UI',Helvetica,Arial,sans-serif; }
.emd-manage h2{ font-size:20px; }

/* ===========================================================
   "Add Your Company" Modal  (green theme, closable)
   =========================================================== */
.emd-modal-overlay{ display:none; position:fixed; inset:0; background:rgba(0,0,0,.6); z-index:99999; align-items:flex-start; justify-content:center; padding:40px 16px; overflow-y:auto; font-family:-apple-system,BlinkMacSystemFont,'Segoe UI',Helvetica,Arial,sans-serif; }
.emd-modal-overlay.is-open{ display:flex; }
body.emd-modal-lock{ overflow:hidden; }
.emd-modal{ background:#fff; border-radius:12px; width:100%; max-width:480px; overflow:hidden; box-shadow:0 20px 60px rgba(0,0,0,.25); animation:emd-pop .2s ease; }
@keyframes emd-pop{ from{ transform:translateY(12px) scale(.98); opacity:0; } to{ transform:none; opacity:1; } }
.emd-modal-head{ background:#2E9B4E; padding:18px 24px; display:flex; justify-content:space-between; align-items:center; }
.emd-modal-head h2{ color:#fff; font-size:15px; font-weight:800; letter-spacing:.04em; margin:0; }
.emd-modal-close{ background:rgba(255,255,255,.15); border:none; color:#fff; width:30px; height:30px; border-radius:50%; cursor:pointer; font-size:18px; line-height:1; display:flex; align-items:center; justify-content:center; transition:background .15s; }
.emd-modal-close:hover{ background:rgba(255,255,255,.28); }
.emd-modal-body{ padding:24px; max-height:calc(100vh - 160px); overflow-y:auto; }

.emd-form label{ display:block; font-weight:600; font-size:12px; color:#6b6b6b; }
.emd-form input, .emd-form textarea, .emd-form select{ width:100%; border:1px solid #ddd; border-radius:8px; padding:9px 12px; font-size:13px; background:#f5f5f3; color:#1a1a1a; outline:none; margin-top:5px; transition:border-color .15s, background .15s; }
.emd-form input:focus, .emd-form textarea:focus, .emd-form select:focus{ border-color:#2E9B4E; background:#fff; }
.emd-form p{ margin:0 0 14px; }

.emd-bank-block{ margin-top:12px; padding:16px; background:var(--emd-gold-pale,#FAEEDA); border:1px solid #EF9F27; border-radius:10px; }
.emd-bank-block h4{ margin:0 0 8px; color:#633806; font-size:14px; }
.emd-price{ font-size:14px; }
.emd-bank-details{ background:#fff; border:1px solid #e0e0e0; border-radius:8px; padding:13px; white-space:pre-line; font-family:ui-monospace,SFMono-Regular,Menlo,monospace; font-size:12px; }

.emd-form-actions{ display:flex; gap:10px; flex-wrap:wrap; margin-top:8px; }
.emd-btn-primary{ background:#2E9B4E; color:#fff; border:none; font-size:14px; font-weight:700; padding:11px 20px; border-radius:8px; cursor:pointer; transition:background .15s; }
.emd-btn-primary:hover{ background:#1e7a3a; }
.emd-btn-secondary{ background:#fff; color:#2E9B4E; border:1px solid #2E9B4E; font-size:14px; font-weight:700; padding:11px 20px; border-radius:8px; cursor:pointer; transition:background .15s; }
.emd-btn-secondary:hover{ background:#e8f5ec; }
.emd-btn-primary:disabled, .emd-btn-secondary:disabled{ opacity:.6; cursor:not-allowed; }
.emd-form-message{ padding:11px 13px; border-radius:8px; margin-top:12px; font-size:13px; }
.emd-form-message.ok{ background:#e8f5ec; color:#1e7a3a; }
.emd-form-message.err{ background:#fdecea; color:#b3261e; }
