/* =========================================================
   DigitalShri – Comparison Table (Elementor widget "DS Comparison Table")
   Charcoal heading row, violet highlighted "our" column with orange ticks.
   On mobile each row becomes a card. Brand colours only.
   ========================================================= */

.elementor-widget-ds-comparison { width: 100%; }

.ds-cmp {
  --cmp-head-bg: #17181C;
  --cmp-ours: #851CF2;
  --cmp-ours-bg: rgba(133, 28, 242, 0.05);
  --cmp-ours-border: #851CF2;
  --cmp-row: #FFFFFF;
  --cmp-row-alt: rgba(133, 28, 242, 0.025);
  --cmp-line: rgba(23, 24, 28, 0.07);
  --cmp-radius: 18px;
  padding: 70px 24px;
  font-family: "Montserrat", sans-serif;
  color: #17181C;
  box-sizing: border-box;
}
.ds-cmp *, .ds-cmp *::before, .ds-cmp *::after { box-sizing: border-box; }
.ds-cmp .cmp-inner { max-width: 1260px; margin: 0 auto; }

/* ---------- Heading ---------- */
.ds-cmp .cmp-head { max-width: 900px; margin: 0 auto 48px; text-align: center; }
.ds-cmp .cmp-title {
  margin: 0 0 16px;
  padding: 0;
  color: #17181C;
  font-family: "Montserrat", sans-serif;
  font-size: var(--ds-h2-size, 40px);
  font-weight: 700;
  line-height: 1.2;
  letter-spacing: -0.5px;
}
.ds-cmp .cmp-title span { display: block; color: #851CF2; }
.ds-cmp .cmp-text {
  margin: 0 auto;
  max-width: 820px;
  color: rgba(23, 24, 28, 0.7);
  font-size: 16px;
  line-height: 1.75;
}

/* ---------- Table ---------- */
.ds-cmp .cmp-table-wrap {
  max-width: 1260px;
  margin: 0 auto;
  border-radius: var(--cmp-radius);
  background: var(--cmp-row);
  box-shadow: 0 20px 50px rgba(23, 24, 28, 0.08);
}
.ds-cmp .cmp-table {
  width: 100%;
  margin: 0;
  border: 0;
  border-collapse: separate;
  border-spacing: 0;
  table-layout: fixed;
  font-size: 15px;
}
.ds-cmp .cmp-table th,
.ds-cmp .cmp-table td {
  padding: 20px 22px;
  border: 0;
  border-bottom: 1px solid var(--cmp-line);
  text-align: left;
  vertical-align: middle;
  line-height: 1.5;
  background-color: var(--cmp-row);
}
.ds-cmp .cmp-table tbody tr:nth-child(even) th,
.ds-cmp .cmp-table tbody tr:nth-child(even) td:not(.is-ours) { background-color: var(--cmp-row-alt); }
.ds-cmp .cmp-table tbody tr:last-child th,
.ds-cmp .cmp-table tbody tr:last-child td { border-bottom: 0; }

/* column widths: label 20%, ours 38%, others share the rest */
.ds-cmp .cmp-table th:first-child { width: 20%; }
.ds-cmp .cmp-table thead th.is-ours { width: 38%; }
.ds-cmp .cmp-table.is-3col thead th.is-ours { width: 44%; }

/* heading row */
.ds-cmp .cmp-table thead th {
  padding-top: 22px;
  padding-bottom: 22px;
  background-color: var(--cmp-head-bg);
  color: #FFFFFF;
  font-size: 16px;
  font-weight: 700;
  border-bottom: 0;
}
.ds-cmp .cmp-table thead th:first-child { border-top-left-radius: var(--cmp-radius); }
.ds-cmp .cmp-table thead th:last-child { border-top-right-radius: var(--cmp-radius); }
.ds-cmp .cmp-table tbody tr:last-child th:first-child { border-bottom-left-radius: var(--cmp-radius); }
.ds-cmp .cmp-table tbody tr:last-child td:last-child { border-bottom-right-radius: var(--cmp-radius); }

/* first column */
.ds-cmp .cmp-table tbody th {
  color: #17181C;
  font-size: 16px;
  font-weight: 700;
}
/* other columns */
.ds-cmp .cmp-table td {
  color: rgba(23, 24, 28, 0.62);
  font-size: 14.5px;
  font-weight: 500;
}

/* highlighted "our" column */
.ds-cmp .cmp-table thead th.is-ours {
  position: relative;
  background-color: var(--cmp-ours);
  box-shadow: inset 2px 0 0 var(--cmp-ours-border), inset -2px 0 0 var(--cmp-ours-border);
}
.ds-cmp .cmp-table td.is-ours {
  background-color: var(--cmp-row);
  background-image: linear-gradient(var(--cmp-ours-bg), var(--cmp-ours-bg));
  box-shadow: inset 2px 0 0 var(--cmp-ours-border), inset -2px 0 0 var(--cmp-ours-border);
  color: #17181C;
  font-size: 15px;
  font-weight: 600;
}
.ds-cmp .cmp-table tbody tr:last-child td.is-ours {
  box-shadow: inset 2px 0 0 var(--cmp-ours-border), inset -2px 0 0 var(--cmp-ours-border), inset 0 -2px 0 var(--cmp-ours-border);
}
.ds-cmp .cmp-ours-text { display: inline-flex; align-items: flex-start; gap: 10px; }
.ds-cmp .cmp-tick {
  flex-shrink: 0;
  width: 18px;
  height: 18px;
  margin-top: 2px;
  color: #F38218;
}

/* subtle row hover (desktop) */
@media (hover: hover) {
  .ds-cmp .cmp-table tbody tr:hover th,
  .ds-cmp .cmp-table tbody tr:hover td:not(.is-ours) { background-color: rgba(133, 28, 242, 0.05); }
}

/* ---------- Tablet ---------- */
@media (max-width: 1024px) {
  .ds-cmp { padding: 60px 24px; }
  .ds-cmp .cmp-head { margin-bottom: 36px; }
  .ds-cmp .cmp-table th, .ds-cmp .cmp-table td { padding: 16px 14px; }
  .ds-cmp .cmp-table { font-size: 14px; }
  .ds-cmp .cmp-table tbody th { font-size: 15px; }
}

/* ---------- Mobile: one card per row ---------- */
@media (max-width: 767px) {
  .ds-cmp { padding: 48px 16px; }
  .ds-cmp .cmp-text { font-size: 15px; }
  .ds-cmp .cmp-table-wrap { background: none; box-shadow: none; border-radius: 0; }
  .ds-cmp .cmp-table, .ds-cmp .cmp-table tbody, .ds-cmp .cmp-table tr,
  .ds-cmp .cmp-table th, .ds-cmp .cmp-table td { display: block; width: 100% !important; }
  .ds-cmp .cmp-table thead { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
  .ds-cmp .cmp-table tbody tr {
    margin: 0 0 16px;
    overflow: hidden;
    border-radius: 16px;
    background: var(--cmp-row);
    box-shadow: 0 12px 30px rgba(23, 24, 28, 0.08);
  }
  .ds-cmp .cmp-table tbody tr:last-child { margin-bottom: 0; }
  .ds-cmp .cmp-table th, .ds-cmp .cmp-table td,
  .ds-cmp .cmp-table tbody tr:nth-child(even) th,
  .ds-cmp .cmp-table tbody tr:nth-child(even) td:not(.is-ours) {
    padding: 12px 18px;
    border-radius: 0 !important;
    background-color: var(--cmp-row);
  }
  .ds-cmp .cmp-table tbody th {
    padding: 14px 18px;
    background-color: var(--cmp-head-bg);
    color: #FFFFFF;
    font-size: 16px;
  }
  .ds-cmp .cmp-table td::before {
    content: attr(data-label);
    display: block;
    margin-bottom: 3px;
    color: rgba(23, 24, 28, 0.5);
    font-size: 11px;
    font-weight: 700;
    letter-spacing: 1px;
    text-transform: uppercase;
  }
  .ds-cmp .cmp-table td.is-ours,
  .ds-cmp .cmp-table tbody tr:last-child td.is-ours {
    box-shadow: inset 4px 0 0 var(--cmp-ours-border);
  }
  .ds-cmp .cmp-table td.is-ours::before { color: var(--cmp-ours); }
  .ds-cmp .cmp-table tbody tr td:last-child { border-bottom: 0; }
}
