/* ==========================================================
   Giá Xăng Hôm Nay – Plugin Stylesheet
   ========================================================== */

:root {
  --gxhn-accent: #e63946;
  --gxhn-bg: #ffffff;
  --gxhn-border: #e8ecf0;
  --gxhn-text: #1a202c;
  --gxhn-muted: #718096;
  --gxhn-radius: 14px;
  --gxhn-shadow: 0 4px 24px rgba(0, 0, 0, 0.08);
  --gxhn-card-gap: 12px;
  --gxhn-up: #e53e3e;
  --gxhn-down: #38a169;
  --gxhn-same: #718096;
}

/* ── Wrapper ─────────────────────────────────────── */
.gxhn-wrapper {
  font-family: 'Segoe UI', 'Inter', system-ui, -apple-system, sans-serif;
  background: var(--gxhn-bg);
  border: 1px solid var(--gxhn-border);
  border-radius: var(--gxhn-radius);
  box-shadow: var(--gxhn-shadow);
  padding: 24px;
  max-width: 800px;
  margin: 0 auto 24px auto;
  color: var(--gxhn-text);
  overflow: hidden;
  position: relative;
}

.gxhn-wrapper::before {
  content: '';
  display: block;
  height: 4px;
  background: linear-gradient(90deg, var(--gxhn-accent), color-mix(in srgb, var(--gxhn-accent) 60%, #fff));
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  border-radius: var(--gxhn-radius) var(--gxhn-radius) 0 0;
}

/* ── Header ─────────────────────────────────────── */
.gxhn-header {
  display: flex;
  align-items: center;
  gap: 14px;
  margin-bottom: 20px;
  padding-top: 4px;
}

.gxhn-fuel-icon {
  font-size: 36px;
  line-height: 1;
  background: linear-gradient(135deg, color-mix(in srgb, var(--gxhn-accent) 15%, #fff), color-mix(in srgb, var(--gxhn-accent) 5%, #fff));
  width: 56px;
  height: 56px;
  border-radius: 12px;
  display: flex;
  align-items: center;
  justify-content: center;
  border: 1px solid color-mix(in srgb, var(--gxhn-accent) 20%, transparent);
  flex-shrink: 0;
}

.gxhn-title {
  font-size: 1.3rem;
  font-weight: 700;
  margin: 0 0 4px 0;
  color: var(--gxhn-text);
  line-height: 1.2;
}

.gxhn-date {
  font-size: 0.82rem;
  color: var(--gxhn-muted);
  margin: 0;
}

/* ── MODERN CARD STYLE ───────────────────────────── */
.gxhn-style-modern .gxhn-cards {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(220px, 1fr));
  gap: var(--gxhn-card-gap);
}

.gxhn-style-modern .gxhn-card {
  background: linear-gradient(135deg, #f8fafc 0%, #f1f5f9 100%);
  border: 1px solid var(--gxhn-border);
  border-radius: 12px;
  padding: 16px;
  display: flex;
  gap: 12px;
  align-items: flex-start;
  transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.gxhn-style-modern .gxhn-card:hover {
  transform: translateY(-2px);
  box-shadow: 0 8px 24px rgba(0, 0, 0, 0.12);
}

.gxhn-style-modern .gxhn-card-icon {
  font-size: 24px;
  width: 40px;
  height: 40px;
  background: linear-gradient(135deg, color-mix(in srgb, var(--gxhn-accent) 15%, #fff), color-mix(in srgb, var(--gxhn-accent) 5%, #fff));
  border-radius: 8px;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  border: 1px solid color-mix(in srgb, var(--gxhn-accent) 15%, transparent);
}

.gxhn-style-modern .gxhn-card-title {
  font-size: 0.82rem;
  font-weight: 600;
  color: var(--gxhn-muted);
  text-transform: uppercase;
  letter-spacing: 0.04em;
  margin-bottom: 8px;
  line-height: 1.3;
}

.gxhn-style-modern .gxhn-card-prices {
  display: flex;
  flex-direction: column;
  gap: 6px;
}

/* ── MINIMAL CARD STYLE ─────────────────────────── */
.gxhn-style-minimal .gxhn-cards {
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.gxhn-style-minimal .gxhn-card {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 12px 16px;
  border-bottom: 1px solid var(--gxhn-border);
  transition: background 0.15s;
}

.gxhn-style-minimal .gxhn-card:last-child {
  border-bottom: none;
}

.gxhn-style-minimal .gxhn-card:hover {
  background: #f8fafc;
  border-radius: 8px;
}

.gxhn-style-minimal .gxhn-card-icon {
  font-size: 20px;
  width: 32px;
  text-align: center;
  flex-shrink: 0;
}

.gxhn-style-minimal .gxhn-card-body {
  flex: 1;
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.gxhn-style-minimal .gxhn-card-title {
  font-size: 0.9rem;
  font-weight: 600;
  color: var(--gxhn-text);
  margin-bottom: 0;
}

.gxhn-style-minimal .gxhn-card-prices {
  display: flex;
  gap: 12px;
  align-items: center;
  flex-wrap: wrap;
  justify-content: flex-end;
}

/* ── Zone Block (shared) ─────────────────────────── */
.gxhn-zone-block {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 2px;
}

.gxhn-style-minimal .gxhn-zone-block {
  flex-direction: row;
  align-items: center;
  gap: 6px;
}

.gxhn-zone-label {
  font-size: 0.72rem;
  color: var(--gxhn-muted);
  font-weight: 500;
  text-transform: uppercase;
  letter-spacing: 0.05em;
}

.gxhn-zone-price {
  font-size: 1rem;
  font-weight: 700;
  color: var(--gxhn-accent);
  white-space: nowrap;
}

/* ── Price Change Badge ──────────────────────────── */
.gxhn-badge {
  font-size: 0.7rem;
  font-weight: 600;
  padding: 2px 7px;
  border-radius: 20px;
  white-space: nowrap;
  display: inline-block;
}

.gxhn-badge-up {
  background: #fff5f5;
  color: var(--gxhn-up);
  border: 1px solid #fed7d7;
}

.gxhn-badge-down {
  background: #f0fff4;
  color: var(--gxhn-down);
  border: 1px solid #c6f6d5;
}

.gxhn-badge-same {
  background: #f7fafc;
  color: var(--gxhn-same);
  border: 1px solid #e2e8f0;
}

/* ── CLASSIC TABLE STYLE ─────────────────────────── */
.gxhn-table-wrap {
  overflow-x: auto;
  -webkit-overflow-scrolling: touch;
}

.gxhn-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 0.9rem;
}

.gxhn-table thead th {
  background: linear-gradient(135deg, color-mix(in srgb, var(--gxhn-accent) 10%, #fff), color-mix(in srgb, var(--gxhn-accent) 5%, #fff));
  color: var(--gxhn-text);
  font-weight: 700;
  padding: 10px 14px;
  text-align: left;
  border-bottom: 2px solid color-mix(in srgb, var(--gxhn-accent) 20%, transparent);
  font-size: 0.82rem;
  text-transform: uppercase;
  letter-spacing: 0.04em;
}

.gxhn-table tbody tr {
  transition: background 0.15s;
}

.gxhn-table tbody tr:nth-child(even) {
  background: #f8fafc;
}

.gxhn-table tbody tr:hover {
  background: #edf2f7;
}

.gxhn-table td {
  padding: 11px 14px;
  border-bottom: 1px solid var(--gxhn-border);
  vertical-align: middle;
}

.gxhn-table td.gxhn-fuel-name {
  font-weight: 600;
  white-space: nowrap;
}

.gxhn-table td.gxhn-price-cell {
  font-weight: 700;
  color: var(--gxhn-accent);
  white-space: nowrap;
}

/* ── Footer ─────────────────────────────────────── */
.gxhn-compare-note {
  font-size: 0.8rem;
  color: var(--gxhn-muted);
  margin: 16px 0 4px 0;
  padding: 10px 14px;
  background: #f8fafc;
  border-radius: 8px;
  border-left: 3px solid var(--gxhn-accent);
}

.gxhn-source {
  font-size: 0.75rem;
  color: #a0aec0;
  margin: 8px 0 0 0;
  text-align: right;
}

.gxhn-source a {
  color: var(--gxhn-accent);
  text-decoration: none;
}

.gxhn-source a:hover {
  text-decoration: underline;
}

/* ── Error ───────────────────────────────────────── */
.gxhn-error {
  padding: 16px;
  background: #fff5f5;
  border: 1px solid #fed7d7;
  border-radius: 10px;
  color: #c53030;
  font-size: 0.9rem;
}

/* ── Dark Mode Support ───────────────────────────── */
@media (prefers-color-scheme: dark) {
  .gxhn-wrapper {
    --gxhn-bg: #1a202c;
    --gxhn-border: #2d3748;
    --gxhn-text: #f7fafc;
    --gxhn-muted: #a0aec0;
    background: #1a202c;
  }

  .gxhn-style-modern .gxhn-card {
    background: linear-gradient(135deg, #2d3748, #243349);
  }

  .gxhn-style-minimal .gxhn-card:hover {
    background: #2d3748;
  }

  .gxhn-table tbody tr:nth-child(even) {
    background: #2d3748;
  }

  .gxhn-table tbody tr:hover {
    background: #4a5568;
  }

  .gxhn-table thead th {
    background: #2d3748;
  }

  .gxhn-compare-note {
    background: #2d3748;
  }

  .gxhn-badge-up {
    background: #2d1515;
    border-color: #744444;
  }

  .gxhn-badge-down {
    background: #132d15;
    border-color: #2d6a35;
  }

  .gxhn-badge-same {
    background: #2d3748;
    border-color: #4a5568;
  }
}

/* ── Responsive ──────────────────────────────────── */
@media (max-width: 600px) {
  .gxhn-wrapper {
    padding: 16px;
  }

  .gxhn-title {
    font-size: 1.1rem;
  }

  .gxhn-style-modern .gxhn-cards {
    grid-template-columns: 1fr 1fr;
  }

  .gxhn-style-minimal .gxhn-card-body {
    flex-direction: column;
    align-items: flex-start;
    gap: 6px;
  }

  .gxhn-style-minimal .gxhn-card-prices {
    justify-content: flex-start;
  }
}

@media (max-width: 380px) {
  .gxhn-style-modern .gxhn-cards {
    grid-template-columns: 1fr;
  }
}

/* ================================================================
   V2 – Petrolimex-style table + Date Picker + Chart
   ================================================================ */

/* ── V2 Wrapper ────────────────────────────────────────────────── */
.gxhn-v2-wrapper {
  font-family: 'Segoe UI', 'Inter', system-ui, -apple-system, sans-serif;
  background: #fff;
  border: 1px solid #e2e8f0;
  border-radius: 12px;
  box-shadow: 0 2px 16px rgba(0, 0, 0, 0.07);
  padding: 24px;
  max-width: 860px;
  margin: 0 auto 28px;
  color: #1a202c;
  overflow: hidden;
}

/* ── V2 Header ─────────────────────────────────────────────────── */
.gxhn-v2-header {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 16px;
  margin-bottom: 18px;
  flex-wrap: wrap;
}

.gxhn-v2-title {
  font-size: 1.6rem;
  font-weight: 800;
  color: var(--gxhn-accent, #e63946);
  margin: 0 0 4px;
  line-height: 1.2;
}

.gxhn-v2-desc {
  font-size: 0.85rem;
  color: #718096;
  margin: 0;
  line-height: 1.5;
  max-width: 500px;
}

/* ── Date Picker ───────────────────────────────────────────────── */
.gxhn-v2-datepicker-wrap {
  display: flex;
  align-items: center;
  gap: 6px;
  background: #f7fafc;
  border: 1px solid #e2e8f0;
  border-radius: 8px;
  padding: 6px 12px;
  flex-shrink: 0;
  box-shadow: 0 1px 4px rgba(0, 0, 0, 0.05);
  transition: border-color 0.2s;
}

.gxhn-v2-datepicker-wrap:focus-within {
  border-color: var(--gxhn-accent, #e63946);
  box-shadow: 0 0 0 3px color-mix(in srgb, var(--gxhn-accent, #e63946) 15%, transparent);
}

.gxhn-dp-icon {
  font-size: 16px;
}

.gxhn-date-picker {
  border: none !important;
  background: transparent !important;
  font-size: 0.92rem;
  font-weight: 600;
  color: #2d3748;
  cursor: pointer;
  outline: none !important;
  box-shadow: none !important;
  min-width: 120px;
  font-family: inherit;
  padding: 2px 0;
  display: block;
  appearance: none;
  -webkit-appearance: none;
}

/* Ẩn bớt các icon mặc định không cần thiết của trình duyệt nếu có */
.gxhn-date-picker::-webkit-inner-spin-button,
.gxhn-date-picker::-webkit-calendar-picker-indicator {
  cursor: pointer;
  opacity: 0.6;
  transition: opacity 0.2s;
}

.gxhn-date-picker::-webkit-calendar-picker-indicator:hover {
  opacity: 1;
}

/* ── Petrolimex Label ──────────────────────────────────────────── */
.gxhn-v2-table-section {
  margin-bottom: 24px;
  border: 1px solid #e2e8f0;
  border-radius: 10px;
  overflow: hidden;
}

.gxhn-petrolimex-header {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 10px 14px;
  background: #fafafa;
  border-bottom: 1px solid #e2e8f0;
  font-size: 0.9rem;
  color: #2d3748;
}

.gxhn-plx-dot {
  width: 14px;
  height: 14px;
  border-radius: 50%;
  background: #e63946;
  display: inline-block;
  flex-shrink: 0;
  box-shadow: 0 0 0 3px rgba(230, 57, 70, 0.15);
}

.gxhn-plx-sub {
  color: #a0aec0;
  font-size: 0.82rem;
  margin-left: 4px;
}

/* ── Table Relative container (for overlay) ────────────────────── */
.gxhn-table-relative {
  position: relative;
}

.gxhn-table-overlay {
  position: absolute;
  inset: 0;
  background: rgba(255, 255, 255, 0.85);
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: 0 0 10px 10px;
  backdrop-filter: blur(2px);
  z-index: 10;
}

.gxhn-spinner-wrap {
  display: flex;
  align-items: center;
  gap: 10px;
  font-size: 0.9rem;
  color: #718096;
  font-weight: 500;
}

/* Spinner animation */
.gxhn-spin {
  display: block;
  width: 20px;
  height: 20px;
  border: 3px solid #e2e8f0;
  border-top-color: var(--gxhn-accent, #e63946);
  border-radius: 50%;
  animation: gxhn-rotate 0.7s linear infinite;
}

@keyframes gxhn-rotate {
  to {
    transform: rotate(360deg);
  }
}

/* ── Petrolimex Table ──────────────────────────────────────────── */
.gxhn-plx-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 0.9rem;
}

.gxhn-plx-table thead tr {
  background: var(--gxhn-accent, #e63946);
  color: #fff;
}

.gxhn-plx-table thead th {
  padding: 11px 14px;
  text-align: center;
  font-weight: 700;
  font-size: 0.82rem;
  letter-spacing: 0.02em;
  white-space: nowrap;
}

.gxhn-plx-table thead th.col-fuel {
  text-align: left;
}

.gxhn-plx-table tbody tr {
  border-bottom: 1px solid #f0f0f0;
  transition: background 0.12s;
}

.gxhn-plx-table tbody tr:last-child {
  border-bottom: none;
}

.gxhn-plx-table tbody tr:hover {
  background: #fff8f8;
}

.gxhn-plx-table tbody tr:nth-child(even) {
  background: #fafafa;
}

.gxhn-plx-table tbody tr:nth-child(even):hover {
  background: #fff5f5;
}

.gxhn-plx-table td {
  padding: 11px 14px;
  vertical-align: middle;
  text-align: center;
}

.gxhn-plx-table td.col-fuel {
  text-align: left;
  font-weight: 600;
  color: #2d3748;
  white-space: nowrap;
}

.gxhn-fuel-ico {
  margin-right: 6px;
}

.gxhn-plx-table td.col-price {
  font-weight: 700;
  color: #1a202c;
  font-size: 0.95rem;
}

/* Inline up/down/zero in table */
.gxhn-up {
  color: #c53030;
  font-weight: 700;
}

.gxhn-down {
  color: #276749;
  font-weight: 700;
}

.gxhn-zero {
  color: #718096;
}

/* AJAX error */
.gxhn-ajax-error {
  color: #c53030;
  padding: 12px 16px;
  background: #fff5f5;
  border: 1px solid #fed7d7;
  border-radius: 6px;
  font-size: 0.88rem;
  margin: 8px;
}

/* ── Chart Section ─────────────────────────────────────────────── */
.gxhn-v2-chart-section {
  background: #f8fafc;
  border: 1px solid #e2e8f0;
  border-radius: 10px;
  padding: 18px 20px 14px;
  margin-bottom: 14px;
}

.gxhn-chart-title {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 0.95rem;
  font-weight: 700;
  color: #2d3748;
  margin-bottom: 14px;
}

.gxhn-chart-icon {
  font-size: 18px;
}

.gxhn-chart-canvas-wrap canvas {
  width: 100% !important;
}

.gxhn-chart-note {
  font-size: 0.72rem;
  color: #a0aec0;
  text-align: right;
  margin: 8px 0 0;
}

/* ── Skeleton Loader ───────────────────────────────────────────── */
.gxhn-chart-skeleton {
  padding: 4px 0;
}

.gxhn-skeleton-bar {
  background: linear-gradient(90deg, #f0f0f0 25%, #e0e0e0 50%, #f0f0f0 75%);
  background-size: 200% 100%;
  animation: gxhn-shimmer 1.4s ease-in-out infinite;
  border-radius: 8px;
}

@keyframes gxhn-shimmer {
  0% {
    background-position: 200% 0;
  }

  100% {
    background-position: -200% 0;
  }
}

/* ── V2 Responsive ─────────────────────────────────────────────── */
@media (max-width: 640px) {
  .gxhn-v2-header {
    flex-direction: column;
    gap: 10px;
  }

  .gxhn-v2-title {
    font-size: 1.3rem;
  }

  .gxhn-plx-table {
    font-size: 0.8rem;
  }

  .gxhn-plx-table td,
  .gxhn-plx-table th {
    padding: 8px 8px;
  }

  .gxhn-v2-wrapper {
    padding: 14px;
  }

  .gxhn-v2-chart-section {
    padding: 14px 12px 10px;
  }
}

@media (prefers-color-scheme: dark) {
  .gxhn-v2-wrapper {
    background: #1a202c;
    border-color: #2d3748;
    color: #f7fafc;
  }

  .gxhn-petrolimex-header {
    background: #2d3748;
    border-color: #4a5568;
  }

  .gxhn-plx-table tbody tr:nth-child(even) {
    background: #243349;
  }

  .gxhn-plx-table tbody tr:hover {
    background: #2d3748;
  }

  .gxhn-plx-table tbody tr:nth-child(even):hover {
    background: #2d3748;
  }

  .gxhn-plx-table td.col-fuel {
    color: #f0f4f8;
  }

  .gxhn-plx-table td.col-price {
    color: #e2e8f0;
  }

  .gxhn-v2-chart-section {
    background: #2d3748;
    border-color: #4a5568;
  }

  .gxhn-v2-datepicker-wrap {
    background: #2d3748;
    border-color: #4a5568;
  }

  .gxhn-date-picker {
    color: #f7fafc;
  }

  .gxhn-skeleton-bar {
    background: linear-gradient(90deg, #2d3748 25%, #3a4a5c 50%, #2d3748 75%);
    background-size: 200% 100%;
  }
}

/* ================================================================
   Modal Explanation System
   ================================================================ */

.gxhn-help-trigger {
  cursor: help;
  position: relative;
  text-decoration: underline dotted #fff8;
  transition: background 0.2s;
}

.gxhn-help-trigger:hover {
  background: rgba(255, 255, 255, 0.1) !important;
}

.gxhn-info-ico {
  display: inline-block;
  margin-left: 4px;
  font-size: 0.75rem;
  opacity: 0.8;
  vertical-align: middle;
}

.gxhn-modal {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  z-index: 999999;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 20px;
}

.gxhn-modal-overlay {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: rgba(0, 0, 0, 0.5);
  backdrop-filter: blur(4px);
}

.gxhn-modal-content {
  position: relative;
  background: #fff;
  width: 100%;
  max-width: 500px;
  border-radius: 16px;
  box-shadow: 0 20px 25px -5px rgba(0, 0, 0, 0.1), 0 10px 10px -5px rgba(0, 0, 0, 0.04);
  animation: gxhn-modal-anim 0.3s cubic-bezier(0.34, 1.56, 0.64, 1);
  overflow: hidden;
}

@keyframes gxhn-modal-anim {
  from {
    transform: scale(0.9);
    opacity: 0;
  }

  to {
    transform: scale(1);
    opacity: 1;
  }
}

.gxhn-modal-close {
  position: absolute;
  top: 12px;
  right: 12px;
  border: none;
  background: #f1f5f9;
  width: 32px;
  height: 32px;
  border-radius: 50%;
  font-size: 20px;
  line-height: 1;
  cursor: pointer;
  color: #64748b;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: all 0.2s;
}

.gxhn-modal-close:hover {
  background: #e2e8f0;
  color: #1e293b;
  transform: rotate(90deg);
}

.gxhn-modal-body {
  padding: 24px;
}

.gxhn-modal-title {
  font-size: 1.25rem;
  font-weight: 700;
  color: var(--gxhn-accent, #e63946);
  margin: 0 0 16px;
  padding-bottom: 12px;
  border-bottom: 1px solid #f1f5f9;
}

.gxhn-zone-name {
  font-weight: 700;
  color: #1e293b;
  margin-bottom: 8px;
  font-size: 1rem;
}

.gxhn-zone-list {
  font-size: 0.9rem;
  line-height: 1.6;
  color: #475569;
  max-height: 250px;
  overflow-y: auto;
  padding-right: 8px;
}

.gxhn-zone-list::-webkit-scrollbar {
  width: 4px;
}

.gxhn-zone-list::-webkit-scrollbar-thumb {
  background: #cbd5e1;
  border-radius: 4px;
}

.gxhn-modal-note {
  margin-top: 20px;
  padding-top: 16px;
  border-top: 1px dashed #e2e8f0;
  font-size: 0.8rem;
  color: #94a3b8;
  font-style: italic;
}

@media (prefers-color-scheme: dark) {
  .gxhn-modal-content {
    background: #1e293b;
    color: #f1f5f9;
  }

  .gxhn-modal-close {
    background: #334155;
    color: #94a3b8;
  }

  .gxhn-modal-close:hover {
    background: #475569;
    color: #f1f5f9;
  }

  .gxhn-modal-title {
    border-color: #334155;
  }

  .gxhn-zone-name {
    color: #f1f5f9;
  }

  .gxhn-zone-list {
    color: #cbd5e1;
  }

  .gxhn-modal-note {
    border-color: #334155;
  }
}

/* ================================================================
   SVG Icon System
   ================================================================ */

/* Base icon size & alignment */
.gxhn-ico {
  width: 20px;
  height: 20px;
  display: inline-block;
  vertical-align: middle;
  flex-shrink: 0;
  transition: transform 0.15s ease;
}

/* Fuel type color coding */
.gxhn-ico-gas {
  color: var(--gxhn-accent, #e63946);
}

/* red – RON 95/92 */
.gxhn-ico-bio {
  color: #38a169;
}

/* green – E5/E10 bio */
.gxhn-ico-diesel {
  color: #3182ce;
}

/* blue – diesel DO */
.gxhn-ico-flame {
  color: #d97706;
}

/* amber – kerosene */
.gxhn-ico-barrel {
  color: #718096;
}

/* gray – default */

/* Hover lift on table rows */
.gxhn-plx-table tbody tr:hover .gxhn-ico {
  transform: scale(1.15);
}

/* Date picker calendar SVG */
.gxhn-dp-svg {
  width: 16px;
  height: 16px;
  color: var(--gxhn-accent, #e63946);
  display: block;
  flex-shrink: 0;
}

/* Chart trend SVG */
.gxhn-chart-svg {
  width: 20px;
  height: 20px;
  color: var(--gxhn-accent, #e63946);
  display: block;
  flex-shrink: 0;
}

/* Fuel cell: flex icon + text */
.gxhn-plx-table td.col-fuel {
  display: flex;
  align-items: center;
  gap: 8px;
}

/* Fuel icon wrapper */
.gxhn-fuel-ico {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 28px;
  height: 28px;
  border-radius: 6px;
  background: #f7fafc;
  flex-shrink: 0;
  border: 1px solid #e2e8f0;
  transition: background 0.15s;
}

.gxhn-plx-table tbody tr:hover .gxhn-fuel-ico {
  background: #edf2f7;
}

/* ================================================================
   Mobile & Tablet Optimizations
   ================================================================ */

/* Tablet (641px – 1024px) */
@media (min-width: 641px) and (max-width: 1024px) {
  .gxhn-v2-wrapper {
    padding: 20px 18px;
  }

  .gxhn-v2-title {
    font-size: 1.4rem;
  }

  .gxhn-plx-table {
    font-size: 0.88rem;
  }

  .gxhn-plx-table td,
  .gxhn-plx-table th {
    padding: 10px 12px;
  }

  .gxhn-chart-canvas-wrap {
    min-height: 320px;
    height: auto;
  }
}

/* Mobile — Fix layout & Sticky table */
@media (max-width: 640px) {
  .gxhn-v2-wrapper {
    padding: 12px;
    border-radius: 8px;
    border: none;
    box-shadow: 0 1px 10px rgba(0, 0, 0, 0.05);
  }

  .gxhn-v2-header {
    flex-direction: column;
    align-items: stretch;
    gap: 8px;
    margin-bottom: 12px;
  }

  .gxhn-v2-title {
    font-size: 1.25rem;
    text-align: center;
  }

  .gxhn-v2-desc {
    display: none;
  }

  .gxhn-v2-datepicker-wrap {
    justify-content: center;
    width: 100%;
    border-color: #e2e8f0;
  }

  .gxhn-date-picker {
    font-size: 0.9rem;
    flex-grow: 1;
    text-align: center;
  }

  .gxhn-table-relative {
    overflow: hidden;
    border-radius: 8px;
  }

  .gxhn-v2-table-body {
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
  }

  .gxhn-plx-table {
    min-width: 500px;
    font-size: 0.8rem;
    border-collapse: separate;
    border-spacing: 0;
  }

  .gxhn-plx-table th.col-fuel,
  .gxhn-plx-table td.col-fuel {
    position: sticky;
    left: 0;
    z-index: 10;
    background: #fff;
    border-right: 1px solid #eee;
    min-width: 100px !important;
    white-space: normal !important;
  }

  .gxhn-plx-table thead th.col-fuel {
    background: var(--gxhn-accent, #ed8936) !important;
    z-index: 3;
    color: #fff;
  }

  .gxhn-plx-table td,
  .gxhn-plx-table th {
    padding: 8px 6px;
  }

  .gxhn-fuel-ico {
    display: none !important;
  }

  .gxhn-chart-canvas-wrap {
    min-height: 280px;
  }

  .gxhn-chart-canvas-wrap canvas {
    min-height: 280px !important;
  }
}


/* Small mobile (< 400px) */
@media (max-width: 400px) {
  .gxhn-v2-title {
    font-size: 1.2rem;
  }

  .gxhn-plx-table {
    font-size: 0.75rem;
    min-width: 460px;
  }

  .gxhn-plx-table td,
  .gxhn-plx-table th {
    padding: 8px 8px;
  }

  .gxhn-v2-chart-section {
    padding: 12px 10px;
  }

  .gxhn-chart-title strong {
    font-size: 0.85rem;
  }
}

/* Dark mode SVG icon colors */
@media (prefers-color-scheme: dark) {
  .gxhn-fuel-ico {
    background: #2d3748;
    border-color: #4a5568;
  }

  .gxhn-plx-table tbody tr:hover .gxhn-fuel-ico {
    background: #4a5568;
  }

  .gxhn-ico-gas {
    color: #fc8181;
  }

  .gxhn-ico-bio {
    color: #68d391;
  }

  .gxhn-ico-diesel {
    color: #63b3ed;
  }

  .gxhn-ico-flame {
    color: #f6ad55;
  }

  .gxhn-ico-barrel {
    color: #a0aec0;
  }
}