/* EPG / XMLTV Guide Viewer, Cleaner & Timezone Shifter — ValSolution */
.epg-wrap {
  max-width: 1160px;
  margin: 0 auto;
  padding: 24px 16px 56px;
}

.epg-hero {
  background: linear-gradient(135deg, #0b132b 0%, #162447 52%, #1b4332 100%);
  color: #f8fafc;
  border-radius: 18px;
  padding: 28px 28px 24px;
  margin-bottom: 22px;
  box-shadow: 0 12px 32px rgba(15, 23, 42, 0.14);
}
.epg-badge {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-size: 12px;
  font-weight: 700;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  padding: 4px 10px;
  border-radius: 999px;
  background: rgba(52, 211, 153, 0.18);
  color: #6ee7b7;
  margin-bottom: 10px;
}
.epg-hero h1 {
  margin: 0 0 8px;
  font-size: clamp(1.45rem, 2.6vw, 2.05rem);
  line-height: 1.22;
  color: #ffffff;
}
.epg-hero p {
  margin: 0;
  color: #cbd5e1;
  font-size: 0.98rem;
  max-width: 810px;
  line-height: 1.55;
}

.epg-card {
  background: #ffffff;
  border: 1px solid #e2e8f0;
  border-radius: 16px;
  padding: 20px;
  margin-bottom: 18px;
  box-shadow: 0 4px 16px rgba(15, 23, 42, 0.04);
}

.epg-input-grid {
  display: grid;
  grid-template-columns: 1fr 1.25fr;
  gap: 16px;
  align-items: stretch;
}
.epg-dropzone {
  border: 2px dashed #94a3b8;
  border-radius: 14px;
  padding: 24px 16px;
  text-align: center;
  background: #f8fafc;
  display: flex;
  flex-direction: column;
  justify-content: center;
  align-items: center;
  cursor: pointer;
  transition: border-color 0.16s ease, background 0.16s ease;
}
.epg-dropzone.dragover {
  border-color: #059669;
  background: #ecfdf5;
}
.epg-drop-title {
  font-size: 1rem;
  font-weight: 700;
  color: #0f172a;
  margin: 0 0 6px;
}
.epg-drop-sub {
  font-size: 0.85rem;
  color: #64748b;
  margin: 0 0 14px;
}
.epg-paste-box {
  display: flex;
  flex-direction: column;
  gap: 8px;
}
.epg-paste-box textarea {
  width: 100%;
  min-height: 140px;
  box-sizing: border-box;
  border: 1px solid #cbd5e1;
  border-radius: 12px;
  padding: 10px 12px;
  font-family: ui-monospace, SFMono-Regular, Menlo, monospace;
  font-size: 0.81rem;
  resize: vertical;
  color: #0f172a;
}

.epg-btn-row {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}
.epg-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  border: 1px solid #cbd5e1;
  background: #ffffff;
  color: #0f172a;
  font-size: 0.85rem;
  font-weight: 600;
  padding: 8px 13px;
  border-radius: 10px;
  cursor: pointer;
  transition: all 0.15s ease;
}
.epg-btn:hover:not(:disabled) { background: #f1f5f9; border-color: #94a3b8; }
.epg-btn:disabled { opacity: 0.5; cursor: not-allowed; }
.epg-btn-primary {
  background: #059669;
  border-color: #059669;
  color: #ffffff;
}
.epg-btn-primary:hover:not(:disabled) { background: #047857; border-color: #047857; }
.epg-btn-dark {
  background: #0f172a;
  border-color: #0f172a;
  color: #ffffff;
}
.epg-btn-dark:hover:not(:disabled) { background: #1e293b; border-color: #1e293b; }
.epg-btn-sm {
  padding: 6px 10px;
  font-size: 0.78rem;
  border-radius: 8px;
}

.epg-status {
  margin-top: 12px;
  padding: 9px 13px;
  border-radius: 10px;
  font-size: 0.86rem;
  font-weight: 500;
  display: none;
}
.epg-status.show { display: block; }
.epg-status.ok { background: #ecfdf5; color: #065f46; border: 1px solid #a7f3d0; }
.epg-status.warn { background: #fffbeb; color: #92400e; border: 1px solid #fde68a; }
.epg-status.err { background: #fef2f2; color: #991b1b; border: 1px solid #fecaca; }

.epg-workspace[hidden] { display: none; }

.epg-stats {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 12px;
  margin-bottom: 18px;
}
.epg-stat {
  background: #f8fafc;
  border: 1px solid #e2e8f0;
  border-radius: 12px;
  padding: 12px 14px;
}
.epg-stat-label {
  font-size: 0.74rem;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  color: #64748b;
  font-weight: 700;
  margin-bottom: 4px;
}
.epg-stat-val {
  font-size: 1.24rem;
  font-weight: 800;
  color: #0f172a;
}
.epg-stat-val.green { color: #059669; }
.epg-stat-val.amber { color: #b45309; }

.epg-controls-box {
  background: #f8fafc;
  border: 1px solid #e2e8f0;
  border-radius: 12px;
  padding: 16px;
  margin-bottom: 14px;
}
.epg-controls-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 12px;
  margin-bottom: 12px;
}
.epg-field label {
  display: block;
  font-size: 0.8rem;
  font-weight: 700;
  color: #334155;
  margin-bottom: 5px;
}
.epg-field input,
.epg-field select {
  width: 100%;
  box-sizing: border-box;
  padding: 9px 11px;
  border: 1px solid #cbd5e1;
  border-radius: 9px;
  font-size: 0.88rem;
  background: #ffffff;
  color: #0f172a;
}

.epg-nudges {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  margin-bottom: 12px;
}
.epg-checks {
  display: flex;
  flex-wrap: wrap;
  gap: 16px;
  padding-top: 10px;
  border-top: 1px solid #e2e8f0;
  font-size: 0.84rem;
  font-weight: 600;
  color: #334155;
}
.epg-checks label {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  cursor: pointer;
}

.epg-export-bar {
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  align-items: center;
  gap: 10px;
}

.epg-tabs {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-bottom: 12px;
}
.epg-tab {
  border: 1px solid #cbd5e1;
  background: #f8fafc;
  color: #334155;
  padding: 8px 14px;
  border-radius: 10px;
  font-size: 0.86rem;
  font-weight: 700;
  cursor: pointer;
}
.epg-tab.active {
  background: #059669;
  border-color: #059669;
  color: #ffffff;
}

.epg-toolbar {
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  align-items: center;
  gap: 10px;
  margin-bottom: 10px;
}
.epg-search {
  padding: 8px 12px;
  border: 1px solid #cbd5e1;
  border-radius: 9px;
  font-size: 0.86rem;
  min-width: 230px;
}

.epg-table-wrap {
  max-height: 410px;
  overflow: auto;
  border: 1px solid #e2e8f0;
  border-radius: 12px;
}
.epg-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 0.84rem;
}
.epg-table th,
.epg-table td {
  padding: 9px 10px;
  text-align: left;
  border-bottom: 1px solid #e2e8f0;
  vertical-align: middle;
}
.epg-table th {
  position: sticky;
  top: 0;
  background: #f8fafc;
  font-weight: 700;
  color: #334155;
  z-index: 1;
}
.epg-inline-inp {
  width: 100%;
  min-width: 120px;
  box-sizing: border-box;
  border: 1px solid #cbd5e1;
  border-radius: 7px;
  padding: 5px 8px;
  font-size: 0.82rem;
  color: #0f172a;
}
.epg-mono {
  font-family: ui-monospace, SFMono-Regular, Menlo, monospace;
  font-size: 0.78rem;
  white-space: nowrap;
}
.epg-shifted {
  color: #047857;
  font-weight: 700;
}
.epg-logo-img {
  width: 28px;
  height: 28px;
  object-fit: contain;
  border-radius: 5px;
  background: #f1f5f9;
  border: 1px solid #e2e8f0;
}
.epg-pill {
  display: inline-block;
  padding: 2px 8px;
  border-radius: 999px;
  font-size: 0.74rem;
  font-weight: 700;
  background: #e0f2fe;
  color: #075985;
}

/* SEO Sections */
.epg-seo { display: grid; gap: 18px; margin-top: 24px; }
.epg-seo h2 { margin: 0 0 10px; font-size: 1.24rem; color: #0f172a; }
.epg-seo p, .epg-seo li { color: #334155; line-height: 1.65; font-size: 0.94rem; }
.epg-benefits-grid,
.epg-related-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 12px;
  margin-top: 10px;
}
.epg-benefit,
.epg-related-card {
  background: #f8fafc;
  border: 1px solid #e2e8f0;
  border-radius: 12px;
  padding: 14px;
}
.epg-benefit h3 { margin: 0 0 6px; font-size: 0.95rem; color: #0f172a; }
.epg-benefit p { margin: 0; font-size: 0.86rem; }
.epg-related-card {
  display: block;
  text-decoration: none;
  transition: border-color 0.15s ease, transform 0.15s ease;
}
.epg-related-card:hover { border-color: #059669; transform: translateY(-2px); }
.epg-related-card strong { display: block; color: #0f172a; margin-bottom: 4px; font-size: 0.94rem; }
.epg-related-card span { display: block; color: #64748b; font-size: 0.83rem; line-height: 1.45; }
.epg-faq details {
  border: 1px solid #e2e8f0;
  border-radius: 10px;
  padding: 12px 14px;
  margin-bottom: 10px;
  background: #f8fafc;
}
.epg-faq summary { font-weight: 700; color: #0f172a; cursor: pointer; font-size: 0.93rem; }
.epg-faq details p { margin: 8px 0 0; font-size: 0.89rem; }

@media (max-width: 900px) {
  .epg-input-grid,
  .epg-controls-grid,
  .epg-benefits-grid,
  .epg-related-grid {
    grid-template-columns: 1fr;
  }
  .epg-stats { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}
@media (max-width: 520px) {
  .epg-stats { grid-template-columns: 1fr; }
  .epg-hero { padding: 22px 18px; }
}
