/**
 * Public styles — fully scoped under .iptvdash-root to avoid theme conflicts.
 * Inherits the WordPress theme font (no custom font-family).
 */
.iptvdash-root {
  --iptvdash-bg: #f6f7f9;
  --iptvdash-surface: #ffffff;
  --iptvdash-text: #111111;
  --iptvdash-muted: #111111;
  --iptvdash-border: #d8dde6;
  --iptvdash-accent: #1f6feb;
  --iptvdash-accent-soft: #e8f0fe;
  --iptvdash-success: #111111;
  --iptvdash-danger: #111111;
  --iptvdash-radius: 10px;
  --iptvdash-shadow: 0 8px 24px rgba(20, 24, 36, 0.06);
  box-sizing: border-box;
  color: #111111;
  max-width: 1100px;
  margin: 0 auto;
  padding: 1rem;
}

.iptvdash-root.iptvdash-theme-light {
  --iptvdash-bg: #f6f7f9;
  --iptvdash-surface: #ffffff;
  --iptvdash-text: #111111;
  --iptvdash-muted: #111111;
  --iptvdash-success: #111111;
  --iptvdash-danger: #111111;
  color: #111111;
}

.iptvdash-root.iptvdash-theme-dark {
  --iptvdash-bg: #12151c;
  --iptvdash-surface: #1c212b;
  --iptvdash-text: #ffffff;
  --iptvdash-muted: #ffffff;
  --iptvdash-border: #2f3747;
  --iptvdash-accent: #4c8dff;
  --iptvdash-accent-soft: rgba(76, 141, 255, 0.18);
  --iptvdash-success: #ffffff;
  --iptvdash-danger: #ffffff;
  --iptvdash-shadow: 0 8px 24px rgba(0, 0, 0, 0.35);
  color: #ffffff;
}

.iptvdash-root.iptv-dashboard-packages,
.iptvdash-root.iptv-dashboard-trial-form {
  max-width: 1200px;
  background: var(--iptvdash-bg);
  border-radius: var(--iptvdash-radius);
}

.iptvdash-root *,
.iptvdash-root *::before,
.iptvdash-root *::after {
  box-sizing: border-box;
}

.iptvdash-root .iptvdash-card,
.iptvdash-root .form-container,
.iptvdash-root .package-card {
  background: var(--iptvdash-surface);
  border: 1px solid var(--iptvdash-border);
  border-radius: var(--iptvdash-radius);
  box-shadow: var(--iptvdash-shadow);
  color: var(--iptvdash-text);
}

/* Trial form */
.iptvdash-root.iptv-dashboard-trial-form .form-container {
  padding: 1.5rem;
  max-width: 520px;
  margin: 0 auto;
}

.iptvdash-root.iptv-dashboard-trial-form h2 {
  margin: 0 0 0.35rem;
  font-size: 1.6rem;
  font-weight: 700;
  color: var(--iptvdash-text);
}

.iptvdash-root.iptv-dashboard-trial-form > .form-container > p,
.iptvdash-root .iptvdash-lead {
  color: var(--iptvdash-muted);
  margin: 0 0 1.25rem;
}

.iptvdash-root .form-group {
  margin-bottom: 1rem;
}

.iptvdash-root .form-group label {
  display: block;
  font-weight: 600;
  margin-bottom: 0.35rem;
  font-size: 0.95rem;
  color: var(--iptvdash-text);
}

.iptvdash-root .form-group input[type="email"],
.iptvdash-root .form-group input[type="text"] {
  width: 100%;
  padding: 0.7rem 0.85rem;
  border: 1px solid var(--iptvdash-border);
  border-radius: 8px;
  font-size: 1rem;
  background: var(--iptvdash-surface);
  color: var(--iptvdash-text);
}

.iptvdash-root .form-group input:focus {
  outline: none;
  border-color: var(--iptvdash-accent);
  box-shadow: 0 0 0 3px var(--iptvdash-accent-soft);
}

.iptvdash-root .captcha-container {
  display: flex;
  align-items: center;
  gap: 0.6rem;
  margin-bottom: 0.5rem;
}

.iptvdash-root .captcha-container img {
  height: 48px;
  border-radius: 6px;
  border: 1px solid var(--iptvdash-border);
}

.iptvdash-root .refresh-captcha {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.35rem;
  border: 1px solid var(--iptvdash-border);
  background: var(--iptvdash-surface);
  color: var(--iptvdash-text);
  border-radius: 8px;
  min-width: 40px;
  height: 40px;
  padding: 0 0.7rem;
  cursor: pointer;
  font-size: 0.85rem;
  font-weight: 600;
  line-height: 1;
}

.iptvdash-root .refresh-captcha:hover {
  background: var(--iptvdash-bg);
  border-color: var(--iptvdash-muted);
}

.iptvdash-root .iptvdash-refresh-icon {
  display: block;
  flex: 0 0 auto;
}

.iptvdash-root .iptvdash-refresh-label {
  display: inline;
}

.iptvdash-root .button.button-primary,
.iptvdash-root .iptvdash-btn-primary,
.iptvdash-root .trial-button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 100%;
  padding: 0.75rem 1rem;
  border: 0;
  border-radius: 8px;
  background: var(--iptvdash-accent);
  color: #fff !important;
  font-weight: 700;
  text-decoration: none !important;
  cursor: pointer;
  font-size: 1rem;
}

.iptvdash-root .button.button-primary:hover,
.iptvdash-root .trial-button:hover {
  filter: brightness(1.05);
}

.iptvdash-root .form-message {
  margin-top: 0.75rem;
  padding: 0.65rem 0.8rem;
  border-radius: 8px;
}

.iptvdash-root .form-message.error {
  background: #fde8e6;
  color: var(--iptvdash-danger);
}

.iptvdash-root.iptvdash-theme-dark .form-message.error {
  background: rgba(240, 113, 120, 0.15);
}

.iptvdash-root .form-message.success {
  background: #e6f6ee;
  color: var(--iptvdash-success);
}

.iptvdash-root.iptvdash-theme-dark .form-message.success {
  background: rgba(61, 214, 140, 0.15);
}

.iptvdash-root .trial-success-container {
  text-align: center;
  padding: 1rem 0;
}

/* Packages — 4 cards per row on desktop, responsive down */
.iptvdash-root.iptv-dashboard-packages .packages-row {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 1rem;
  align-items: stretch;
}

.iptvdash-root .package-card {
  position: relative;
  padding: 1.25rem;
  display: flex;
  flex-direction: column;
  gap: 0.85rem;
  min-width: 0;
}

.iptvdash-root .package-card.popular {
  border-color: var(--iptvdash-accent);
  box-shadow: 0 10px 28px rgba(31, 111, 235, 0.15);
}

.iptvdash-root.iptvdash-theme-dark .package-card.popular {
  box-shadow: 0 10px 28px rgba(76, 141, 255, 0.2);
}

.iptvdash-root .popular-badge {
  position: absolute;
  top: 10px;
  right: 10px;
  background: var(--iptvdash-accent);
  color: #fff;
  font-size: 0.7rem;
  font-weight: 700;
  padding: 0.2rem 0.5rem;
  border-radius: 999px;
}

.iptvdash-root .package-name {
  margin: 0;
  font-size: 1.2rem;
  color: var(--iptvdash-text);
}

.iptvdash-root .package-price {
  font-size: 1.6rem;
  font-weight: 700;
  color: var(--iptvdash-text);
}

.iptvdash-root .package-currency {
  display: inline-block;
  margin-left: 0.25rem;
  font-size: 0.85rem;
  font-weight: 600;
  color: var(--iptvdash-muted);
}

.iptvdash-root .original-price {
  color: var(--iptvdash-muted);
  font-size: 0.95rem;
  margin-right: 0.35rem;
}

.iptvdash-root .discount-price {
  color: var(--iptvdash-success);
}

.iptvdash-root .package-features ul {
  list-style: none;
  margin: 0;
  padding: 0;
}

.iptvdash-root .package-features li {
  display: flex;
  justify-content: space-between;
  gap: 0.5rem;
  padding: 0.35rem 0;
  border-bottom: 1px dashed var(--iptvdash-border);
  font-size: 0.9rem;
  color: var(--iptvdash-text);
}

.iptvdash-root .feature-label {
  color: var(--iptvdash-muted);
}

.iptvdash-root .feature-value {
  color: var(--iptvdash-text);
}

.iptvdash-root .package-footer {
  margin-top: auto;
}

.iptvdash-root .no-packages {
  grid-column: 1 / -1;
  text-align: center;
  color: var(--iptvdash-muted);
  padding: 2rem;
}

/* Channels (scoped) */
.iptvdash-root .iptvdash-channel-grid,
.iptvdash-root .channel-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(180px, 1fr));
  gap: 1rem;
}

.iptvdash-root .channel-card {
  background: var(--iptvdash-surface);
  border: 1px solid var(--iptvdash-border);
  border-radius: var(--iptvdash-radius);
  padding: 1rem;
  text-align: center;
  color: var(--iptvdash-text);
}

.iptvdash-root .channel-logo {
  width: 72px;
  height: 72px;
  object-fit: contain;
  margin: 0 auto 0.5rem;
}

@media (max-width: 1024px) {
  .iptvdash-root.iptv-dashboard-packages .packages-row {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

@media (max-width: 600px) {
  .iptvdash-root {
    padding: 0.75rem;
  }

  .iptvdash-root.iptv-dashboard-packages .packages-row {
    grid-template-columns: 1fr;
  }
}

/* Light: every label and price is black. Dark: every label and price is white. */
.iptvdash-root.iptvdash-theme-light h1,
.iptvdash-root.iptvdash-theme-light h2,
.iptvdash-root.iptvdash-theme-light h3,
.iptvdash-root.iptvdash-theme-light h4,
.iptvdash-root.iptvdash-theme-light p,
.iptvdash-root.iptvdash-theme-light span,
.iptvdash-root.iptvdash-theme-light label,
.iptvdash-root.iptvdash-theme-light li,
.iptvdash-root.iptvdash-theme-light strong,
.iptvdash-root.iptvdash-theme-light em,
.iptvdash-root.iptvdash-theme-light del,
.iptvdash-root.iptvdash-theme-light small,
.iptvdash-root.iptvdash-theme-light input,
.iptvdash-root.iptvdash-theme-light .form-message,
.iptvdash-root.iptvdash-theme-light .form-message.error,
.iptvdash-root.iptvdash-theme-light .form-message.success,
.iptvdash-root.iptvdash-theme-light .package-name,
.iptvdash-root.iptvdash-theme-light .package-price,
.iptvdash-root.iptvdash-theme-light .price,
.iptvdash-root.iptvdash-theme-light .discount-price,
.iptvdash-root.iptvdash-theme-light .original-price,
.iptvdash-root.iptvdash-theme-light .feature-label,
.iptvdash-root.iptvdash-theme-light .feature-value,
.iptvdash-root.iptvdash-theme-light .package-currency,
.iptvdash-root.iptvdash-theme-light .no-packages,
.iptvdash-root.iptvdash-theme-light .iptvdash-lead,
.iptvdash-root.iptvdash-theme-light .refresh-captcha {
  color: #111111 !important;
}

.iptvdash-root.iptvdash-theme-dark h1,
.iptvdash-root.iptvdash-theme-dark h2,
.iptvdash-root.iptvdash-theme-dark h3,
.iptvdash-root.iptvdash-theme-dark h4,
.iptvdash-root.iptvdash-theme-dark p,
.iptvdash-root.iptvdash-theme-dark span,
.iptvdash-root.iptvdash-theme-dark label,
.iptvdash-root.iptvdash-theme-dark li,
.iptvdash-root.iptvdash-theme-dark strong,
.iptvdash-root.iptvdash-theme-dark em,
.iptvdash-root.iptvdash-theme-dark del,
.iptvdash-root.iptvdash-theme-dark small,
.iptvdash-root.iptvdash-theme-dark input,
.iptvdash-root.iptvdash-theme-dark .form-message,
.iptvdash-root.iptvdash-theme-dark .form-message.error,
.iptvdash-root.iptvdash-theme-dark .form-message.success,
.iptvdash-root.iptvdash-theme-dark .package-name,
.iptvdash-root.iptvdash-theme-dark .package-price,
.iptvdash-root.iptvdash-theme-dark .price,
.iptvdash-root.iptvdash-theme-dark .discount-price,
.iptvdash-root.iptvdash-theme-dark .original-price,
.iptvdash-root.iptvdash-theme-dark .feature-label,
.iptvdash-root.iptvdash-theme-dark .feature-value,
.iptvdash-root.iptvdash-theme-dark .package-currency,
.iptvdash-root.iptvdash-theme-dark .no-packages,
.iptvdash-root.iptvdash-theme-dark .iptvdash-lead,
.iptvdash-root.iptvdash-theme-dark .refresh-captcha {
  color: #ffffff !important;
}

.iptvdash-root.iptvdash-theme-light input::placeholder {
  color: #111111 !important;
  opacity: 0.65;
}

.iptvdash-root.iptvdash-theme-dark input::placeholder {
  color: #ffffff !important;
  opacity: 0.75;
}

.iptvdash-root .trial-button,
.iptvdash-root .button.button-primary,
.iptvdash-root .iptvdash-btn-primary {
  color: #ffffff !important;
}
