/* ranshtam — TIP Comparison Table frontend v2.0.1 */

.rs-tip-wrap {
  --rs-purple: #4B3FD4;
  --rs-purple-dark: #3a30b8;
  --rs-purple-light: #f5f3ff;
  --rs-purple-border: #e8e4ff;
  --rs-yellow: #F8D700;
  --rs-text: #1a1a2e;
  padding: 1.2rem 0;
  direction: rtl;
  font-family: 'Discovery', 'Heebo', Arial, sans-serif;
}

/* ============ DESKTOP TABLE ============ */

.rs-tip-scroll {
  overflow-x: auto;
  border-radius: 14px;
  border: 1.5px solid var(--rs-purple-border);
  box-shadow: 0 2px 16px rgba(75,63,212,0.07);
  display: block; /* explicit */
}

table.rs-tt {
  width: 100%;
  min-width: 680px;
  border-collapse: collapse;
  table-layout: fixed;
  font-size: 13px;
  direction: rtl;
  background: #fff;
  font-family: 'Discovery', 'Heebo', Arial, sans-serif;
}

.rs-tt thead th {
  padding: 12px 8px;
  text-align: center;
  background: var(--rs-purple);
  color: #fff;
  font-weight: 600;
  border: 1px solid var(--rs-purple-dark);
  vertical-align: top;
  font-size: 12px;
}

/* label col — same purple as other headers */
.rs-tt-label-col {
  width: 148px !important;
  background: var(--rs-purple) !important;
  border-color: var(--rs-purple-dark) !important;
  vertical-align: middle !important;
  text-align: center !important;
  padding: 10px 8px !important;
}

.rs-tip-logo-cell {
  display: block;
  height: 28px;
  width: auto;
  max-width: 40% !important;
  margin: 0 auto 4px;
  object-fit: contain;
}

.rs-tip-credit-cell {
  display: block;
  font-size: 9px;
  color: rgba(255,255,255,0.55);
  font-weight: 400;
  white-space: normal;
  line-height: 1.3;
}

/* Logo circles */
.rs-logo-box {
  width: 52px;
  height: 52px;
  border-radius: 50%;
  background: #fff;
  border: 2px solid var(--rs-yellow);
  display: flex;
  align-items: center;
  justify-content: center;
  margin: 0 auto 5px;
  overflow: hidden;
  flex-shrink: 0;
}

/* Critical fix — constrain img inside circle */
.rs-logo-box img,
.rs-logo-img {
  width: 100% !important;
  height: 100% !important;
  max-width: 100% !important;
  max-height: 100% !important;
  object-fit: contain !important;
  padding: 5px;
  display: block;
}

.rs-logo-text-fb {
  font-size: 11px;
  font-weight: 700;
  color: var(--rs-purple);
}

.rs-logo-name {
  font-size: 11px;
  font-weight: 600;
  color: #e8e4ff;
  margin-top: 2px;
}

/* Table body */
.rs-tt tbody tr {
  border-bottom: 1px solid var(--rs-purple-border);
}

.rs-tt tbody tr:nth-child(even) {
  background: #f9f8ff;
}

.rs-tt tbody tr:hover {
  background: var(--rs-purple-border);
}

.rs-tt-cell {
  padding: 11px 8px;
  text-align: center;
  border-right: 1px solid var(--rs-purple-border);
  vertical-align: middle;
  line-height: 1.45;
  color: var(--rs-text);
  word-break: break-word;
}

.rs-tt-row-label {
  font-weight: 600;
  text-align: right !important;
  background: var(--rs-purple-light);
  color: var(--rs-purple);
  padding: 11px 14px 11px 8px;
  font-size: 12px;
  border-left: 1px solid var(--rs-purple-border);
  vertical-align: middle;
}

.rs-sub {
  display: block;
  font-size: 10px;
  color: #888;
  margin-top: 2px;
  font-weight: 400;
}

.rs-dot {
  display: inline-block;
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: var(--rs-yellow);
  margin-left: 5px;
  vertical-align: middle;
}

/* ============ MOBILE ============ */
@media (max-width: 768px) {
  .rs-mobile-view { display: none !important; }
  .rs-tip-scroll {
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
  }
  table.rs-tt {
    min-width: 0;
    width: max-content;
    font-size: 11px;
  }
  .rs-tt thead th:not(.rs-tt-label-col) { min-width: 80px; padding: 8px 4px; }
  .rs-tt-cell { min-width: 80px; padding: 8px 4px; font-size: 11px; }
  .rs-logo-box { width: 34px; height: 34px; }
  .rs-logo-name { font-size: 9px; }
  .rs-tip-logo-cell { height: 18px !important; }
  .rs-tt-label-col, .rs-tt-row-label { font-size: 10px; padding: 8px 6px !important; }
}

/* v2.0.1: fixed column widths on tablet/mobile so long cells wrap instead of stretching the table */
@media (max-width: 768px) {
  table.rs-tt { table-layout: fixed; width: max-content; }
  .rs-tt thead th:not(.rs-tt-label-col),
  .rs-tt .rs-tt-cell {
    width: 118px; min-width: 118px; max-width: 118px;
    white-space: normal; word-break: normal; overflow-wrap: anywhere;
  }
  .rs-tt .rs-tt-label-col,
  .rs-tt .rs-tt-row-label {
    width: 96px !important; min-width: 96px; max-width: 96px;
    white-space: normal;
  }
}
