/* ════════════════════════════════════════════════════════════════
   eSIM Plans List View  —  [esim_plan_list] shortcode styles
   Matches the reference screenshot: row-style cards with
   Provider | Data | Validity | Price | Price/GB | Code | Get Deal | Expand
   ════════════════════════════════════════════════════════════════ */

/* ── Wrapper ── */
.eplv-wrap {
  font-family: 'Inter', sans-serif;
  color: var(--ep-text, #1a1a2e);
  max-width: 1100px;
  margin: 0 auto;
  padding: 24px 16px;
}
.eplv-wrap * { box-sizing: border-box; }

/* ── Section heading ── */
.eplv-title {
  font-size: 22px;
  font-weight: 800;
  margin: 0 0 6px;
  color: var(--ep-text, #1a1a2e);
}
.eplv-subtitle {
  font-size: 13px;
  color: var(--ep-muted, #6b7280);
  margin: 0 0 20px;
}

/* ── Filter bar ── */
.eplv-filter-bar {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  align-items: center;
  margin-bottom: 16px;
  padding: 14px 18px;
  background: #fff;
  border: 2px solid var(--ep-border, #e8e3ff);
  border-radius: 14px;
}
.eplv-filter-bar select,
.eplv-filter-bar input[type="text"] {
  padding: 8px 12px;
  border: 2px solid var(--ep-border, #e8e3ff);
  border-radius: 10px;
  font-family: inherit;
  font-size: 13px;
  font-weight: 600;
  outline: none;
  cursor: pointer;
  background: #fff;
  color: var(--ep-text, #1a1a2e);
  transition: border-color .2s;
  min-width: 130px;
}
.eplv-filter-bar select:hover,
.eplv-filter-bar input[type="text"]:hover,
.eplv-filter-bar select:focus,
.eplv-filter-bar input[type="text"]:focus {
  border-color: var(--ep, #6C5CE7);
}
.eplv-filter-bar .eplv-search-input { flex: 1; min-width: 180px; }
.eplv-result-count {
  margin-left: auto;
  font-size: 12px;
  color: var(--ep-muted, #6b7280);
  font-weight: 600;
  white-space: nowrap;
}

/* ── Table header row ── */
.eplv-header {
  display: grid;
  grid-template-columns: var(--eplv-cols);
  align-items: center;
  padding: 0 16px;
  margin-bottom: 6px;
}
.eplv-th {
  font-size: 11px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: .6px;
  color: var(--ep-muted, #6b7280);
}
.eplv-th.eplv-th-center { text-align: center; }

/* ── List container ── */
.eplv-list {
  display: flex;
  flex-direction: column;
  gap: 6px;
}

/* ── Single row card ── */
.eplr-row {
  background: #fff;
  border: 1.5px solid #eee;
  border-radius: 14px;
  display: grid;
  grid-template-columns: var(--eplv-cols);
  align-items: center;
  padding: 0 16px;
  min-height: 68px;
  transition: box-shadow .2s, border-color .2s, transform .15s;
  position: relative;
  overflow: visible;
}
.eplr-row:hover {
  border-color: var(--ep, #6C5CE7);
  box-shadow: 0 4px 20px rgba(108,92,231,.10);
  transform: translateY(-1px);
}
.eplr-row.eplr-featured {
  border-color: var(--ep, #6C5CE7);
  background: linear-gradient(100deg, #f8f6ff 0%, #fff 60%);
}
.eplr-row.eplr-featured::before {
  content: '⭐ TOP PICK';
  position: absolute;
  top: -1px;
  left: 14px;
  background: linear-gradient(135deg, var(--ep, #6C5CE7), var(--ea, #00CEC9));
  color: #fff;
  font-size: 9px;
  font-weight: 800;
  letter-spacing: .5px;
  padding: 3px 10px 4px;
  border-radius: 0 0 10px 10px;
  z-index: 2;
}

/* ── Provider cell ── */
.eplr-provider {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 12px 0;
  min-width: 0;
}
.eplr-prov-logo {
  width: 38px;
  height: 38px;
  object-fit: contain;
  border-radius: 8px;
  border: 1.5px solid #f0f0f0;
  flex-shrink: 0;
  background: #fafafa;
  padding: 3px;
}
.eplr-prov-initial {
  width: 38px;
  height: 38px;
  border-radius: 8px;
  background: linear-gradient(135deg, var(--ep, #6C5CE7), var(--ea, #00CEC9));
  color: #fff;
  font-size: 13px;
  font-weight: 800;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}
.eplr-prov-name {
  font-size: 14px;
  font-weight: 700;
  color: var(--ep-text, #1a1a2e);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

/* ── Generic data cell ── */
.eplr-cell {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  padding: 10px 4px;
  text-align: center;
}
.eplr-val {
  font-size: 14px;
  font-weight: 700;
  color: var(--ep-text, #1a1a2e);
  white-space: nowrap;
}
.eplr-na { color: #d1d5db; font-weight: 400; }

/* Price cell — coloured */
.eplr-price-orig {
  font-size: 11px;
  color: #9ca3af;
  text-decoration: line-through;
  font-weight: 500;
}
.eplr-price-sale {
  color: #16a34a;
}

/* ── Discount + coupon cell ── */
.eplr-code {
  flex-direction: column;
  gap: 4px;
}
.eplr-discount-badge {
  display: inline-block;
  background: #ff6b6b;
  color: #fff;
  font-size: 9px;
  font-weight: 800;
  letter-spacing: .5px;
  padding: 3px 7px;
  border-radius: 6px;
  white-space: nowrap;
}
.eplr-copy-code {
  background: none;
  border: 1.5px dashed #d1a000;
  border-radius: 6px;
  padding: 3px 9px;
  font-family: 'Inter', monospace;
  font-size: 11px;
  font-weight: 800;
  color: #9a7000;
  cursor: pointer;
  letter-spacing: 1px;
  transition: background .15s, color .15s;
  white-space: nowrap;
}
.eplr-copy-code:hover { background: #fffbea; }
.eplr-copy-code.copied { background: #dcfce7; color: #16a34a; border-color: #86efac; }
.eplr-no-code { font-size: 13px; color: #d1d5db; }

/* ── Get Deal button ── */
.eplr-cta-cell { justify-content: center; }
.eplr-deal-btn {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  padding: 10px 20px;
  background: linear-gradient(135deg, var(--ep, #6C5CE7), var(--ea, #00CEC9));
  color: #fff !important;
  text-decoration: none !important;
  font-size: 13px;
  font-weight: 700;
  font-family: 'Inter', sans-serif;
  border: none;
  border-radius: 50px;
  cursor: pointer;
  transition: opacity .2s, transform .15s, box-shadow .2s;
  box-shadow: 0 3px 12px rgba(108,92,231,.25);
  white-space: nowrap;
}
.eplr-deal-btn:hover {
  opacity: .9;
  transform: translateY(-1px);
  box-shadow: 0 6px 20px rgba(108,92,231,.35);
}
.eplr-deal-disabled {
  background: #e5e7eb !important;
  color: #9ca3af !important;
  box-shadow: none !important;
  cursor: not-allowed;
  pointer-events: none;
}
.eplr-arrow { transition: transform .18s; }
.eplr-deal-btn:hover .eplr-arrow { transform: translateX(3px); }

/* ── Expand toggle ── */
.eplr-toggle-cell { justify-content: center; align-items: center; }
.eplr-toggle-btn {
  width: 32px;
  height: 32px;
  border-radius: 50%;
  border: 2px solid #eee;
  background: #fff;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: border-color .2s, background .2s;
  flex-shrink: 0;
  color: #6b7280;
}
.eplr-toggle-btn:hover {
  border-color: var(--ep, #6C5CE7);
  background: #f0eeff;
  color: var(--ep, #6C5CE7);
}
.eplr-toggle-btn[aria-expanded="true"] { background: var(--ep, #6C5CE7); color: #fff; border-color: var(--ep, #6C5CE7); }
.eplr-toggle-btn[aria-expanded="true"] .eplr-chevron { transform: rotate(180deg); }
.eplr-chevron {
  font-size: 16px;
  line-height: 1;
  display: block;
  transition: transform .22s ease;
}

/* ── Expanded details panel ── */
.eplr-details {
  grid-column: 1 / -1;
  border-top: 1.5px solid #f3f4f6;
  margin: 0 -16px;
  padding: 0;
  animation: eplr-slide-in .2s ease;
}
.eplr-details[hidden] { display: none; }
@keyframes eplr-slide-in {
  from { opacity: 0; transform: translateY(-6px); }
  to   { opacity: 1; transform: translateY(0); }
}
.eplr-details-inner {
  padding: 16px 20px 18px;
  display: flex;
  flex-direction: column;
  gap: 12px;
}

/* Verified row */
.eplr-verified-row {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 10px;
}
.eplr-verified-badge {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  background: #f0fdf4;
  border: 1.5px solid #86efac;
  color: #16a34a;
  font-size: 12px;
  font-weight: 700;
  padding: 4px 12px;
  border-radius: 20px;
}
.eplr-det-stars { display: flex; align-items: center; gap: 2px; }
.eplr-star { font-size: 15px; color: #d1d5db; }
.eplr-star.full  { color: #f59e0b; }
.eplr-star.half  { color: #f59e0b; opacity: .55; }
.eplr-det-rating-val {
  font-size: 13px;
  font-weight: 700;
  color: #f59e0b;
  margin-left: 4px;
  background: #fef3c7;
  padding: 2px 8px;
  border-radius: 8px;
}
.eplr-review-link {
  font-size: 12px;
  color: var(--ep, #6C5CE7);
  font-weight: 600;
  text-decoration: underline;
  text-underline-offset: 2px;
}
.eplr-review-link:hover { text-decoration: none; }

/* Feature pills */
.eplr-feature-pills {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
}
.eplr-feature-pill {
  background: #fff;
  border: 1.5px solid #e5e7eb;
  border-radius: 12px;
  padding: 10px 16px;
  display: flex;
  flex-direction: column;
  gap: 4px;
  min-width: 150px;
  flex: 1;
}
.eplr-fp-wide { flex: 2; min-width: 220px; }
.eplr-fp-full { flex: 3; min-width: 300px; }
.eplr-fp-label {
  font-size: 9px;
  font-weight: 800;
  letter-spacing: .7px;
  color: var(--ep, #6C5CE7);
  text-transform: uppercase;
}
.eplr-fp-val {
  font-size: 13px;
  font-weight: 600;
  color: var(--ep-text, #1a1a2e);
  line-height: 1.4;
}
.eplr-net-tag {
  display: inline-block;
  padding: 2px 8px;
  border-radius: 6px;
  font-size: 12px;
  font-weight: 700;
}
.eplr-net-5g  { background: #dcfce7; color: #16a34a; }
.eplr-net-4g  { background: #dbeafe; color: #1d4ed8; }
.eplr-net-4g_5g, .eplr-net-4g\/5g { background: linear-gradient(90deg,#dbeafe,#dcfce7); color: #374151; }

/* Detail coupon */
.eplr-det-coupon {
  display: flex;
  align-items: center;
  gap: 10px;
  flex-wrap: wrap;
}
.eplr-det-coupon-label {
  font-size: 12px;
  font-weight: 700;
  color: #9a7000;
}
.eplr-det-copy-code {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  background: #fffbea;
  border: 2px dashed #d1a000;
  border-radius: 8px;
  padding: 6px 14px;
  cursor: pointer;
  transition: background .15s;
  font-family: inherit;
}
.eplr-det-copy-code:hover { background: #fef3c7; }
.eplr-det-copy-code.copied { background: #dcfce7; border-color: #86efac; }
.eplr-det-code-text {
  font-family: 'Inter', monospace;
  font-size: 14px;
  font-weight: 800;
  letter-spacing: 2px;
  color: #9a7000;
}
.eplr-det-copy-ico {
  font-size: 11px;
  font-weight: 700;
  color: #6b7280;
  background: #fff;
  border-radius: 5px;
  padding: 2px 8px;
  border: 1px solid #e5e7eb;
}

/* Detail page link */
.eplr-det-detail-link {
  font-size: 12px;
  color: var(--ep, #6C5CE7);
  font-weight: 600;
  text-decoration: none;
  display: inline-flex;
  align-items: center;
  gap: 4px;
  align-self: flex-start;
}
.eplr-det-detail-link:hover { text-decoration: underline; }

/* ── Empty state ── */
.eplv-empty {
  text-align: center;
  padding: 50px 20px;
  color: var(--ep-muted, #6b7280);
}
.eplv-empty .eplv-empty-icon { font-size: 44px; margin-bottom: 12px; }
.eplv-empty p { font-size: 15px; margin: 0; }

/* ── Load more ── */
.eplv-more-wrap {
  text-align: center;
  margin-top: 24px;
}
.eplv-more-btn {
  background: transparent;
  border: 2px solid var(--ep, #6C5CE7);
  color: var(--ep, #6C5CE7);
  font-family: 'Inter', sans-serif;
  font-weight: 700;
  font-size: 13px;
  padding: 11px 32px;
  border-radius: 50px;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  gap: 8px;
  transition: all .22s;
}
.eplv-more-btn:hover { background: var(--ep, #6C5CE7); color: #fff; }
.eplv-more-btn:disabled { opacity: .5; pointer-events: none; }

/* ── Responsive ── */
@media (max-width: 860px) {
  .eplv-header { display: none; }
  .eplr-row {
    grid-template-columns: 1fr 1fr 1fr !important;
    grid-template-rows: auto auto;
    padding: 12px 14px;
    gap: 6px;
  }
  .eplr-provider   { grid-column: 1 / -1; }
  .eplr-data       { align-items: flex-start; }
  .eplr-validity   { align-items: flex-start; }
  .eplr-price      { align-items: flex-start; }
  .eplr-pricegb    { display: none; }
  .eplr-code       { display: none; }
  .eplr-cta-cell   { grid-column: 2; }
  .eplr-toggle-cell { grid-column: 3; justify-content: flex-end; }
  .eplr-cell { align-items: flex-start; text-align: left; }
}
@media (max-width: 540px) {
  .eplr-row {
    grid-template-columns: 1fr auto !important;
  }
  .eplr-provider  { grid-column: 1 / -1; }
  .eplr-data      { grid-column: 1; }
  .eplr-price     { grid-column: 2; }
  .eplr-validity  { display: none; }
  .eplr-cta-cell  { grid-column: 1; }
  .eplr-toggle-cell { grid-column: 2; justify-content: flex-end; align-items: center; }
  .eplr-deal-btn  { width: 100%; justify-content: center; }
}

/* ── Provider header (auto-generated from provider name) ── */
.eplv-provider-header {
  display: flex;
  align-items: center;
  gap: 14px;
  margin-bottom: 18px;
}
.eplv-prov-logo {
  width: 52px;
  height: 52px;
  object-fit: contain;
  border-radius: 10px;
  border: 1.5px solid #f0f0f0;
  background: #fafafa;
  padding: 4px;
  flex-shrink: 0;
}
.eplv-prov-initial-lg {
  width: 52px;
  height: 52px;
  border-radius: 10px;
  background: linear-gradient(135deg, var(--ep,#6C5CE7), var(--ea,#00CEC9));
  color: #fff;
  font-size: 18px;
  font-weight: 800;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}
.eplv-prov-header-info {
  display: flex;
  flex-direction: column;
  gap: 4px;
}
.eplv-title {
  font-size: 20px;
  font-weight: 800;
  margin: 0;
  color: var(--ep-text, #1a1a2e);
}
.eplv-total-badge {
  display: inline-block;
  background: var(--ep-light, #f0eeff);
  color: var(--ep, #6C5CE7);
  font-size: 12px;
  font-weight: 700;
  padding: 3px 10px;
  border-radius: 20px;
  width: fit-content;
}

/* ── Search wrap inside filter bar ── */
.eplv-search-wrap {
  position: relative;
  display: flex;
  align-items: center;
  flex: 1;
  min-width: 180px;
}
.eplv-search-ico {
  position: absolute;
  left: 10px;
  font-size: 13px;
  pointer-events: none;
}
.eplv-search-input {
  width: 100%;
  padding: 8px 12px 8px 32px !important;
  border: 2px solid var(--ep-border, #e8e3ff);
  border-radius: 10px;
  font-family: inherit;
  font-size: 13px;
  font-weight: 500;
  outline: none;
  background: #fff;
  color: var(--ep-text, #1a1a2e);
  transition: border-color .2s;
}
.eplv-search-input:focus { border-color: var(--ep, #6C5CE7); }
.eplv-select {
  padding: 8px 12px;
  border: 2px solid var(--ep-border, #e8e3ff);
  border-radius: 10px;
  font-family: inherit;
  font-size: 13px;
  font-weight: 600;
  outline: none;
  cursor: pointer;
  background: #fff;
  color: var(--ep-text, #1a1a2e);
  transition: border-color .2s;
}
.eplv-select:hover,
.eplv-select:focus { border-color: var(--ep, #6C5CE7); }
