/* =============================================================================
   LPM Frontend Styles  –  logistics-price-plugin
   Fully independent; compatible with any WordPress theme.
============================================================================= */

/* ── Reset & Variables ────────────────────────────────────────────────────── */
:root {
  --lpm-primary:    #1e40af;
  --lpm-primary-lt: #3b82f6;
  --lpm-accent:     #0ea5e9;
  --lpm-green:      #16a34a;
  --lpm-red:        #dc2626;
  --lpm-amber:      #d97706;
  --lpm-air:        #2563eb;
  --lpm-sea:        #0891b2;
  --lpm-rail:       #7c3aed;
  --lpm-truck:      #92400e;
  --lpm-bg:         #f8fafc;
  --lpm-surface:    #ffffff;
  --lpm-border:     #e2e8f0;
  --lpm-text:       #1e293b;
  --lpm-muted:      #64748b;
  --lpm-radius:     10px;
  --lpm-shadow:     0 2px 16px rgba(0,0,0,.08);
  --lpm-shadow-lg:  0 8px 32px rgba(0,0,0,.12);
  --lpm-nav-h:      60px;
  --lpm-transition: .25s cubic-bezier(.4,0,.2,1);
}

/* ── Sticky Nav ───────────────────────────────────────────────────────────── */
.lpm-sticky-nav {
  position: sticky;
  top: 0;
  z-index: 999;
  background: var(--lpm-primary);
  color: #fff;
  box-shadow: 0 2px 12px rgba(30,64,175,.35);
  height: var(--lpm-nav-h);
}
.lpm-sticky-inner {
  max-width: 1280px;
  margin: 0 auto;
  padding: 0 24px;
  height: 100%;
  display: flex;
  align-items: center;
  gap: 24px;
}
.lpm-sticky-title {
  display: flex;
  align-items: center;
  gap: 8px;
  white-space: nowrap;
  font-weight: 600;
  font-size: 15px;
  flex-shrink: 0;
}
.lpm-nav-sep { opacity:.45; }
.lpm-nav-service { opacity: .85; font-weight: 400; font-size: 13px; }
.lpm-nav-updated {
  background: rgba(255,255,255,.18);
  padding: 2px 10px;
  border-radius: 20px;
  font-size: 11px;
  font-weight: 500;
}
.lpm-nav-links {
  display: flex;
  list-style: none;
  margin: 0;
  padding: 0;
  gap: 4px;
  overflow-x: auto;
  scrollbar-width: none;
}
.lpm-nav-links::-webkit-scrollbar { display: none; }
.lpm-nav-links li a {
  display: block;
  color: rgba(255,255,255,.85);
  text-decoration: none;
  padding: 6px 14px;
  border-radius: 6px;
  font-size: 13px;
  font-weight: 500;
  transition: background var(--lpm-transition), color var(--lpm-transition);
  white-space: nowrap;
}
.lpm-nav-links li a:hover,
.lpm-nav-links li a.active { background: rgba(255,255,255,.22); color: #fff; }
.lpm-track-link {
  background: var(--lpm-accent) !important;
  color: #fff !important;
  font-weight: 600 !important;
}

/* ── Hero ─────────────────────────────────────────────────────────────────── */
.lpm-page-hero {
  background: linear-gradient(135deg, var(--lpm-primary) 0%, var(--lpm-primary-lt) 100%);
  color: #fff;
  padding: 56px 24px 40px;
  text-align: center;
}
.lpm-hero-inner { max-width: 840px; margin: 0 auto; }
.lpm-page-hero h1 {
  font-size: clamp(24px, 4vw, 40px);
  font-weight: 800;
  margin: 0 0 12px;
  color: #fff;
  text-shadow: 0 2px 8px rgba(0,0,0,.2);
}
.lpm-hero-sub {
  font-size: 16px;
  opacity: .88;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  flex-wrap: wrap;
}
.lpm-mode-bg-air   .lpm-page-hero { background: linear-gradient(135deg,#1e40af,#3b82f6); }
.lpm-mode-bg-sea   .lpm-page-hero { background: linear-gradient(135deg,#164e63,#0891b2); }
.lpm-mode-bg-rail  .lpm-page-hero { background: linear-gradient(135deg,#4c1d95,#7c3aed); }
.lpm-mode-bg-truck .lpm-page-hero { background: linear-gradient(135deg,#78350f,#d97706); }

/* ── Sections ─────────────────────────────────────────────────────────────── */
.lpm-page-body { background: var(--lpm-bg); }
.lpm-section { padding: 56px 24px; }
.lpm-section-inner { max-width: 1100px; margin: 0 auto; }
.lpm-section-alt { background: #f1f5f9; }
.lpm-section-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 12px;
  margin-bottom: 24px;
}
.lpm-section h2 {
  font-size: 24px;
  font-weight: 700;
  color: var(--lpm-text);
  margin: 0 0 24px;
}
.lpm-section-desc { color: var(--lpm-muted); margin-bottom: 24px; }

/* ── Update Tag ───────────────────────────────────────────────────────────── */
.lpm-update-tag {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  background: #dcfce7;
  color: #166534;
  padding: 5px 14px;
  border-radius: 20px;
  font-size: 13px;
  font-weight: 500;
}
.lpm-update-dot {
  width: 7px; height: 7px;
  border-radius: 50%;
  background: #16a34a;
  animation: lpm-pulse 2s infinite;
}
@keyframes lpm-pulse {
  0%,100%{ opacity:1; transform:scale(1); }
  50%{ opacity:.5; transform:scale(1.4); }
}

/* ── Price Table ──────────────────────────────────────────────────────────── */
.lpm-price-table-wrap {
  background: var(--lpm-surface);
  border-radius: var(--lpm-radius);
  box-shadow: var(--lpm-shadow);
  overflow: hidden;
  border: 1px solid var(--lpm-border);
}
.lpm-price-badge {
  background: #f8fafc;
  border-bottom: 1px solid var(--lpm-border);
  padding: 10px 20px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  font-size: 13px;
  color: var(--lpm-muted);
}
.lpm-update-date { font-weight: 500; }
.lpm-currency-badge {
  background: var(--lpm-primary);
  color: #fff;
  padding: 2px 10px;
  border-radius: 12px;
  font-size: 11px;
  font-weight: 700;
  letter-spacing: .5px;
}
.lpm-price-table {
  width: 100%;
  border-collapse: collapse;
}
.lpm-price-table th {
  background: var(--lpm-primary);
  color: #fff;
  padding: 12px 20px;
  text-align: left;
  font-size: 13px;
  font-weight: 600;
  letter-spacing: .5px;
}
.lpm-price-table td {
  padding: 13px 20px;
  border-bottom: 1px solid var(--lpm-border);
  font-size: 15px;
  color: var(--lpm-text);
}
.lpm-price-table tr:last-child td { border-bottom: none; }
.lpm-price-table tr:nth-child(even) td { background: #f8fafc; }
.lpm-price-table td strong { color: var(--lpm-primary); font-size: 17px; font-weight: 700; }
.lpm-on-request { color: var(--lpm-muted); font-style: italic; font-size: 13px; }
.lpm-price-extra {
  padding: 14px 20px;
  background: #eff6ff;
  border-top: 1px solid #bfdbfe;
  font-size: 13px;
}
.lpm-extra-row { display: flex; gap: 8px; margin-bottom: 4px; }
.lpm-extra-key { font-weight: 600; color: var(--lpm-primary); }
.lpm-channel-notes {
  padding: 12px 20px;
  background: #fefce8;
  border-top: 1px solid #fde68a;
  font-size: 13px;
  color: #78350f;
}

/* ── Tracking Bar ─────────────────────────────────────────────────────────── */
.lpm-tracking-bar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 12px;
  margin-top: 20px;
  padding: 16px 20px;
  background: var(--lpm-surface);
  border-radius: var(--lpm-radius);
  border: 1px solid var(--lpm-border);
  box-shadow: var(--lpm-shadow);
}
.lpm-btn-track {
  background: var(--lpm-accent);
  color: #fff !important;
  padding: 10px 24px;
  border-radius: 7px;
  text-decoration: none;
  font-weight: 700;
  font-size: 14px;
  transition: opacity var(--lpm-transition);
}
.lpm-btn-track:hover { opacity: .88; }

/* ── History Table ────────────────────────────────────────────────────────── */
.lpm-history-scroll { overflow-x: auto; }
.lpm-history-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 14px;
  background: var(--lpm-surface);
  border-radius: var(--lpm-radius);
  overflow: hidden;
  box-shadow: var(--lpm-shadow);
}
.lpm-history-table th {
  background: #334155;
  color: #fff;
  padding: 11px 16px;
  text-align: center;
  white-space: nowrap;
}
.lpm-history-table td {
  padding: 10px 16px;
  border-bottom: 1px solid var(--lpm-border);
  text-align: center;
  color: var(--lpm-text);
}
.lpm-history-table tr:hover td { background: #f0f9ff; }
.lpm-latest-badge {
  background: #dcfce7;
  color: #15803d;
  font-size: 10px;
  padding: 2px 7px;
  border-radius: 10px;
  font-weight: 700;
}

/* ── Weekly Pagination ────────────────────────────────────────────────────── */
.lpm-week-pager-wrap {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 8px;
  margin-bottom: 16px;
}
.lpm-week-btn {
  padding: 6px 14px;
  border: 1px solid var(--lpm-border);
  border-radius: 6px;
  background: #fff;
  color: var(--lpm-text);
  font-size: 13px;
  cursor: pointer;
  transition: all var(--lpm-transition);
}
.lpm-week-btn.active,
.lpm-week-btn:hover {
  background: var(--lpm-primary);
  color: #fff;
  border-color: var(--lpm-primary);
}

/* ── Chart ────────────────────────────────────────────────────────────────── */
.lpm-chart-wrap { background:#fff; border-radius:var(--lpm-radius); padding:24px; box-shadow:var(--lpm-shadow); margin-top:24px; }
.lpm-chart-section { margin-top: 32px; }
.lpm-chart-section h3 { font-size:18px; font-weight:700; margin-bottom:16px; }

/* ── Compact Widget Card ──────────────────────────────────────────────────── */
.lpm-widget-card {
  background: var(--lpm-surface);
  border: 1px solid var(--lpm-border);
  border-radius: var(--lpm-radius);
  padding: 20px;
  box-shadow: var(--lpm-shadow);
  display: flex;
  flex-direction: column;
  gap: 10px;
  transition: box-shadow var(--lpm-transition), transform var(--lpm-transition);
}
.lpm-widget-card:hover { box-shadow: var(--lpm-shadow-lg); transform: translateY(-2px); }
.lpm-widget-header { display: flex; align-items: center; justify-content: space-between; }
.lpm-widget-country { font-weight: 700; font-size: 16px; color: var(--lpm-text); }
.lpm-widget-service { font-size: 13px; color: var(--lpm-muted); }
.lpm-widget-price-row { display: flex; justify-content: space-between; align-items: center; padding: 4px 0; border-bottom: 1px dashed var(--lpm-border); }
.lpm-widget-price-row:last-child { border-bottom: none; }
.lpm-wb-label { font-size: 12px; color: var(--lpm-muted); }
.lpm-wb-price strong { color: var(--lpm-primary); font-size: 15px; }
.lpm-wb-price em { font-size:12px; color:var(--lpm-muted); }
.lpm-widget-updated { font-size: 11px; color: var(--lpm-muted); }
.lpm-widget-btn {
  display: block;
  text-align: center;
  background: var(--lpm-primary);
  color: #fff !important;
  text-decoration: none;
  padding: 9px;
  border-radius: 7px;
  font-size: 13px;
  font-weight: 600;
  margin-top: 6px;
  transition: opacity var(--lpm-transition);
}
.lpm-widget-btn:hover { opacity: .88; }

/* ── Mode Badges ──────────────────────────────────────────────────────────── */
.lpm-mode-badge {
  display: inline-block;
  padding: 3px 10px;
  border-radius: 12px;
  font-size: 12px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: .5px;
  color: #fff;
}
.lpm-mode-air,   .lpm-mode-badge.lpm-mode-air   { background: var(--lpm-air); }
.lpm-mode-sea,   .lpm-mode-badge.lpm-mode-sea   { background: var(--lpm-sea); }
.lpm-mode-rail,  .lpm-mode-badge.lpm-mode-rail  { background: var(--lpm-rail); }
.lpm-mode-truck, .lpm-mode-badge.lpm-mode-truck { background: var(--lpm-truck); }

/* ── All Routes Grid ──────────────────────────────────────────────────────── */
.lpm-all-routes { max-width: 1280px; margin: 0 auto; padding: 40px 24px; }
.lpm-region-title { font-size: 22px; font-weight: 800; margin: 32px 0 16px; color: var(--lpm-text); border-left: 4px solid var(--lpm-primary); padding-left: 14px; }
.lpm-routes-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(240px, 1fr)); gap: 20px; }

/* ── Contact Section ──────────────────────────────────────────────────────── */
.lpm-section-contact { background: #0f172a; }
.lpm-section-contact h2 { color: #fff; }
.lpm-section-contact .lpm-section-desc { color: #94a3b8; }
.lpm-contact-layout { display: grid; grid-template-columns: 1fr 340px; gap: 40px; }
.lpm-contact-form { display: flex; flex-direction: column; gap: 16px; }
.lpm-contact-form .lpm-form-row { display: grid; grid-template-columns: 1fr 1fr; gap: 16px; }
.lpm-contact-form .lpm-form-full { grid-column: 1/-1; }
.lpm-contact-form label {
  display: flex;
  flex-direction: column;
  gap: 6px;
  color: #cbd5e1;
  font-size: 13px;
  font-weight: 500;
}
.lpm-contact-form input,
.lpm-contact-form textarea {
  background: #1e293b;
  border: 1px solid #334155;
  border-radius: 7px;
  padding: 11px 14px;
  color: #f1f5f9;
  font-size: 14px;
  transition: border-color var(--lpm-transition);
  font-family: inherit;
}
.lpm-contact-form input:focus,
.lpm-contact-form textarea:focus { outline: none; border-color: var(--lpm-primary-lt); }
.req { color: #f87171; }
.lpm-btn-submit {
  background: linear-gradient(90deg, var(--lpm-primary), var(--lpm-primary-lt));
  color: #fff;
  border: none;
  padding: 14px 32px;
  border-radius: 8px;
  font-size: 16px;
  font-weight: 700;
  cursor: pointer;
  transition: opacity var(--lpm-transition);
  align-self: flex-start;
}
.lpm-btn-submit:hover { opacity: .88; }
.lpm-form-status { margin-top: 10px; font-size: 14px; }
.lpm-status-ok  { color: #4ade80; }
.lpm-status-err { color: #f87171; }
.lpm-status-sending { color: #94a3b8; }

.lpm-contact-card {
  background: #1e293b;
  border-radius: var(--lpm-radius);
  padding: 24px;
  margin-bottom: 20px;
}
.lpm-contact-card h3,
.lpm-contact-services h3 { color: #fff; font-size: 18px; font-weight: 700; margin-bottom: 16px; }
.lpm-ci-row { display:flex; align-items:center; gap:10px; margin-bottom:10px; font-size:14px; color:#cbd5e1; }
.lpm-ci-row a { color: var(--lpm-accent); }
.lpm-ci-icon { font-size:18px; flex-shrink:0; }
.lpm-ci-note { color:#94a3b8; font-size:12px; border-top:1px solid #334155; padding-top:12px; margin-top:6px; }
.lpm-contact-services { background: #1e293b; border-radius:var(--lpm-radius); padding:24px; }
.lpm-contact-services ul { list-style:none; margin:0; padding:0; display:flex; flex-direction:column; gap:8px; }
.lpm-contact-services li { color:#cbd5e1; font-size:14px; }

/* ── No-data / Error states ───────────────────────────────────────────────── */
.lpm-no-data { color:var(--lpm-muted); padding:24px; text-align:center; }
.lpm-error { color: var(--lpm-red); font-style:italic; }

/* ── Responsive ───────────────────────────────────────────────────────────── */
@media (max-width: 900px) {
  .lpm-contact-layout { grid-template-columns: 1fr; }
  .lpm-contact-form .lpm-form-row { grid-template-columns: 1fr; }
}
@media (max-width: 700px) {
  .lpm-sticky-inner { padding: 0 12px; gap: 8px; }
  .lpm-sticky-title { font-size: 13px; }
  .lpm-nav-links li a { padding: 5px 10px; font-size: 12px; }
  .lpm-section { padding: 36px 16px; }
  .lpm-page-hero { padding: 36px 16px 28px; }
  .lpm-routes-grid { grid-template-columns: 1fr; }
  .lpm-price-table th, .lpm-price-table td { padding: 10px 12px; }
}
@media (max-width: 480px) {
  .lpm-sticky-title { display: none; }
  .lpm-nav-links { width: 100%; }
}

/* ── Content Blocks (editor output) ──────────────────────────────────────── */
.lpm-content-block { line-height: 1.75; color: var(--lpm-text); }
.lpm-content-block h3 { font-size:18px; margin:24px 0 10px; }
.lpm-content-block p  { margin-bottom:14px; }
.lpm-content-block table { width:100%; border-collapse:collapse; margin:16px 0; }
.lpm-content-block table th,
.lpm-content-block table td { border:1px solid var(--lpm-border); padding:10px 14px; font-size:14px; }
.lpm-content-block table th { background:#f1f5f9; font-weight:600; }
.lpm-content-block ul, .lpm-content-block ol { padding-left:22px; margin-bottom:14px; }
