/* Styling for the "כל חבילות החשמל" comparison catalog page.
   Reuses the shared affiliate lead-form + modal styles (window.openAffiliateModal
   from the analyzer's affiliate.js). */
@import url("/styles/components/affiliate-lead.css");

.sr-only {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border: 0;
}

.plans-meta {
  color: #555;
  font-size: 0.95rem;
}

/* ---- Analyzer cross-sell CTA ---- */
.analyzer-cta {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  margin: 1.5rem 0;
  padding: 1.1rem 1.25rem;
  border-radius: 14px;
  background: linear-gradient(135deg, #f3e8ff 0%, #e8f5e9 100%);
  border: 1px solid #c5b3e6;
}

.analyzer-cta__text {
  flex: 1 1 320px;
  line-height: 1.55;
  color: #2e1f47;
}

.analyzer-cta__btn {
  flex: 0 0 auto;
  display: inline-block;
  padding: 0.7rem 1.4rem;
  border-radius: 8px;
  background-color: #7851a9;
  color: #fff;
  font-weight: 700;
  text-decoration: none;
  transition: background-color 0.15s ease;
}

.analyzer-cta__btn:hover {
  background-color: #5f3d87;
}

/* ---- Filter / sort controls ---- */
.plans-controls {
  display: flex;
  flex-wrap: wrap;
  gap: 1.25rem;
  align-items: flex-end;
  margin: 1.5rem 0 0.75rem;
  padding: 1rem 1.25rem;
  background: #faf7ff;
  border: 1px solid #e4dbf4;
  border-radius: 12px;
}

.plans-control {
  display: flex;
  flex-direction: column;
  gap: 0.35rem;
}

.plans-control label {
  font-size: 0.9rem;
  font-weight: 600;
  color: #2e1f47;
}

.plans-control select,
.plans-control input[type="range"] {
  min-width: 180px;
}

.plans-control select {
  padding: 0.5rem 0.6rem;
  border: 1px solid #c9bce0;
  border-radius: 8px;
  font-family: inherit;
  font-size: 1rem;
  background: #fff;
  color: #2e1f47;
}

.plans-control--toggles {
  gap: 0.5rem;
}

.plans-toggle {
  display: flex;
  align-items: center;
  gap: 0.45rem;
  font-weight: 500;
  cursor: pointer;
}

.plans-toggle input {
  width: 1.05rem;
  height: 1.05rem;
  accent-color: #7851a9;
}

.plans-count {
  margin: 0.25rem 0 0.75rem;
  font-size: 0.9rem;
  color: #666;
}

/* ---- Table ---- */
.plans-table-scroll {
  overflow-x: auto;
  -webkit-overflow-scrolling: touch;
}

.plans-table {
  width: 100%;
  border-collapse: collapse;
  background: #fff;
  font-size: 0.95rem;
}

.plans-table th,
.plans-table td {
  padding: 0.7rem 0.75rem;
  text-align: right;
  border-bottom: 1px solid #ececf3;
  vertical-align: top;
}

.plans-table thead th {
  position: sticky;
  top: 0;
  background: #4a148c;
  color: #fff;
  font-weight: 700;
  white-space: nowrap;
  user-select: none;
}

.plans-table thead th:hover {
  background: #5f3d87;
}

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

.plans-table tbody tr:hover {
  background: #f1e9fb;
}

.plans-table td[data-field="discount"] strong {
  color: #2e7d32;
  font-size: 1.05rem;
}

/* ---- Badges ---- */
.meter-badge,
.audience-badge {
  display: inline-block;
  padding: 0.15rem 0.55rem;
  border-radius: 999px;
  font-size: 0.8rem;
  font-weight: 600;
  white-space: nowrap;
}

.meter-badge--all {
  background: #e8f5e9;
  color: #2e7d32;
}

.meter-badge--smart {
  background: #fff3e0;
  color: #b26a00;
}

.audience-badge--new {
  background: #e3f2fd;
  color: #1565c0;
}

.audience-badge--existing {
  background: #f3e5f5;
  color: #7b1fa2;
}

/* ---- Plan terms disclosure ---- */
.plan-terms {
  margin-top: 0.35rem;
}

.plan-terms summary {
  cursor: pointer;
  color: #7851a9;
  font-size: 0.85rem;
  font-weight: 600;
}

.plan-terms p {
  margin: 0.4rem 0 0;
  font-size: 0.85rem;
  color: #555;
  line-height: 1.5;
}

/* ---- Join button ---- */
.join-btn {
  padding: 0.5rem 1rem;
  border: none;
  border-radius: 8px;
  background-color: #7851a9;
  color: #fff;
  font-family: inherit;
  font-size: 0.92rem;
  font-weight: 700;
  cursor: pointer;
  white-space: nowrap;
  transition: background-color 0.15s ease;
}

.join-btn:hover {
  background-color: #5f3d87;
}

.plans-empty {
  margin: 1rem 0;
  padding: 1rem;
  background: #fff3e0;
  border-radius: 10px;
  color: #b26a00;
  text-align: center;
}

/* ---- Mobile: stacked card rows ---- */
@media (max-width: 680px) {
  .plans-table thead {
    display: none;
  }

  .plans-table,
  .plans-table tbody,
  .plans-table tr,
  .plans-table td {
    display: block;
    width: 100%;
  }

  .plans-table tr {
    margin-bottom: 1rem;
    border: 1px solid #e4dbf4;
    border-radius: 12px;
    overflow: hidden;
  }

  .plans-table td {
    display: flex;
    justify-content: space-between;
    gap: 1rem;
    border-bottom: 1px solid #f0edf7;
  }

  .plans-table td::before {
    content: attr(data-label);
    font-weight: 700;
    color: #4a148c;
  }

  .plans-table td[data-label=""]::before {
    content: "";
  }

  .join-btn {
    width: 100%;
  }
}
