/* ==========================================================================
   Zype Super — Consolidated Page Widget Stylesheet
   All styles are properly targeted via specific BEM & scoped container selectors.
   Zero !important flags required.
   ========================================================================== */

/* ==========================================================================
   1. Shared Tokens & Design System Utilities
   ========================================================================== */

.zsw__text,
.zsw__richtext p {
  font-size: 0.95rem;
  line-height: 1.65;
  color: #333333;
  text-decoration: none;
  margin: 0 0 24px;
}

.zsw__text a,
.zsw__richtext a {
  color: #0066ff;
  text-decoration: underline;
}

.zsw__richtext > *:first-child {
  margin-top: 0;
}

.zsw__richtext > *:last-child,
.zsw__richtext > p:last-child {
  margin-bottom: 0;
}

.zsw__richtext h3,
.zh3-subtitle {
  font-size: 1.15rem;
  font-weight: 600;
  color: #111111;
  line-height: 1.35;
  letter-spacing: -0.2px;
  margin: 36px 0 16px;
}

.zsw__richtext h4 {
  font-size: 1.05rem;
  font-weight: 600;
  color: #111111;
  line-height: 1.4;
  margin: 28px 0 12px;
}

.zsw__richtext h2:first-child,
.zsw__richtext h3:first-child,
.zsw__richtext h4:first-child {
  margin-top: 0;
}

.zsw__richtext h2 + p,
.zsw__richtext h3 + p,
.zsw__richtext h4 + p,
.zsw__richtext h2 + ul,
.zsw__richtext h3 + ul,
.zsw__richtext h4 + ul,
.zsw__richtext h2 + ol,
.zsw__richtext h3 + ol,
.zsw__richtext h4 + ol,
.zsw__richtext h2 + table,
.zsw__richtext h3 + table,
.zsw__richtext h4 + table {
  margin-top: 0;
}

.zsw__richtext ul,
.zsw__richtext ol {
  margin: 0 0 24px;
  padding-left: 20px;
}

.zsw__richtext li {
  margin-bottom: 8px;
  line-height: 1.6;
  color: #333333;
}

.zsw__richtext p + ul,
.zsw__richtext p + ol {
  margin-top: -8px;
}

/* Container & Section Padding Defaults */
.zh3-container {
  max-width: 1200px;
  margin: 0 auto;
  width: 100%;
  box-sizing: border-box;
}

.zh3-section-title {
  font-size: clamp(1.75rem, 2.6vw, 2.2rem);
  font-weight: 600;
  color: #111111;
  line-height: 1.25;
  letter-spacing: -0.3px;
  margin: 0 0 20px;
}

.zh3-section-text,
.zh3-section-lead {
  font-size: 0.95rem;
  line-height: 1.65;
  color: #333333;
  text-decoration: none;
  margin: 0 0 24px;
}

/* Background Color Modifiers */
.zh3-blue-full,
.zsw-calc-section--blue {
  background: #f2f7fd;
}

.zh3-white-full,
.zsw-calc-section--white {
  background: #ffffff;
}

.zh3-gray-full,
.zsw-calc-section--gray {
  background: #f8f9fa;
}

.zh3-blue-full,
.zh3-white-full,
.zh3-gray-full,
.zh3-faq-full,
.zh3-content-full,
.zsw-calc-section {
  width: 100%;
  box-sizing: border-box;
  padding: 48px clamp(20px, 5vw, 64px);
}

/* ==========================================================================
   2. Table & Isolation Resets
   ========================================================================== */

.zsw__richtext table {
  border-collapse: separate;
  border-spacing: 0;
  border: 1px solid #eef2f6;
  border-radius: 16px;
  overflow: hidden;
  box-shadow: 0 2px 10px rgba(0, 0, 0, 0.03);
  width: 100%;
  background: #ffffff;
  margin: 16px 0 24px 0;
}

.zsw__richtext table th {
  background: #0066ff;
  color: #ffffff;
  padding: 16px 20px;
  font-weight: 700;
  font-size: 0.88rem;
  line-height: 1.35;
  text-align: center;
  border: none;
}

.zsw__richtext table th:first-child {
  text-align: left;
  padding-left: 24px;
}

.zsw__richtext table th:last-child {
  text-align: left;
  padding-right: 24px;
}

.zsw__richtext table td {
  padding: 16px 20px;
  color: #333333;
  font-size: 0.88rem;
  line-height: 1.5;
  text-align: center;
  border: none;
  border-bottom: 1px solid #f0f4f8;
  background: #ffffff;
  font-weight: 400;
}

.zsw__richtext table td:first-child {
  text-align: left;
  padding-left: 24px;
  font-weight: 700;
  color: #111111;
}

.zsw__richtext table td:last-child {
  text-align: left;
  padding-right: 24px;
  font-weight: 400;
}

.zsw__richtext table tr:last-child td {
  border-bottom: none;
}

.zsw__richtext table td a {
  color: #0066ff;
  text-decoration: underline;
  font-weight: 600;
}

/* ==========================================================================
   2b. Disclaimer & Note Styles
   ========================================================================== */

/* Inline Disclaimers & Table Notes */
.zsw__richtext .disclaimerNote {
  font-size: 0.82rem;
  line-height: 1.55;
  color: #666666;
  font-style: italic;
  margin: -8px 0 20px 0;
}

/* ==========================================================================
   3. Widget: Zh3_Hero_Section (.zsw-hero)
   ========================================================================== */

.zsw-hero {
  --zsw-hero-ink: #111111;
  --zsw-hero-blue: #0066ff;
  --zsw-hero-blue-hover: #0052cc;

  position: relative;
  overflow: hidden;
  width: 100%;
  background: linear-gradient(180deg, #ffffff 0%, #e6f3ff 100%);
  color: var(--zsw-hero-ink);
  padding: 48px clamp(20px, 5vw, 64px) 56px;
  box-sizing: border-box;
}

.zsw-hero__media-wrap {
  position: absolute;
  top: 0;
  right: 0;
  bottom: 0;
  width: 40%;
  min-width: 400px;
  display: flex;
  align-items: center;
  justify-content: flex-end;
  z-index: 2;
  pointer-events: none;
}

.zsw-hero__media-img {
  max-width: 100%;
  width: auto;
  height: auto;
  max-height: 400px;
  display: block;
  object-fit: contain;
  position: relative;
  z-index: 3;
  pointer-events: auto;
  filter: drop-shadow(0 14px 28px rgba(0, 0, 0, 0.15));
}

.zsw-hero__container {
  max-width: 1200px;
  margin: 0 auto;
  position: relative;
  z-index: 10;
}

.zsw-hero__meta-bar {
  display: flex;
  justify-content: space-between;
  align-items: center;
  flex-wrap: wrap;
  gap: 12px;
  margin-bottom: 28px;
  position: relative;
  z-index: 12;
}

.zsw-hero__breadcrumb {
  font-size: 0.9rem;
  font-weight: 500;
  color: #1a1a1a;
  margin: 0;
}

.zsw-hero__breadcrumb a {
  color: inherit;
  text-decoration: none;
}

.zsw-hero__breadcrumb a:hover {
  color: var(--zsw-hero-blue, #0066ff);
}

.zsw-hero__breadcrumb-sep {
  margin: 0 6px;
  color: #1a1a1a;
}

.zsw-hero__lang {
  display: flex;
  align-items: center;
  gap: 6px;
  background: #ffffff;
  border: 1px solid #dcdfe6;
  border-radius: 8px;
  padding: 4px 10px 4px 8px;
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.05);
  position: relative;
  z-index: 15;
  cursor: pointer;
  transition: border-color 0.2s ease;
}

.zsw-hero__lang:hover {
  border-color: var(--zsw-hero-blue, #0066ff);
}

.zsw-hero__lang-icon {
  display: flex;
  align-items: center;
  color: #555555;
}

.zsw-hero__lang-select {
  border: none;
  background: transparent;
  font-size: 0.85rem;
  font-weight: 600;
  color: #111111;
  cursor: pointer;
  outline: none;
  font-family: inherit;
  position: relative;
  z-index: 16;
}

.zsw-hero__grid {
  display: grid;
  grid-template-columns: 1.1fr 0.9fr;
  gap: clamp(28px, 4vw, 56px);
  align-items: center;
}

.zsw-hero__title {
  font-weight: 800;
  font-size: clamp(2.1rem, 3.4vw, 2.6rem);
  line-height: 1.25;
  letter-spacing: -0.3px;
  margin: 0 0 8px;
  color: var(--zsw-hero-blue, #0066ff);
}

.zsw-hero__title-accent {
  display: block;
  font-size: clamp(1.8rem, 3vw, 2.3rem);
  font-weight: 600;
  color: var(--zsw-hero-ink, #111111);
  margin-top: 4px;
}

.zsw-hero__cta {
  display: flex;
  flex-direction: column;
  gap: 10px;
  margin-top: 24px;
  width: 100%;
  max-width: 360px;
  box-sizing: border-box;
}

.zsw-hero__cta-item {
  width: 100%;
  box-sizing: border-box;
}

.zsw-hero__btn {
  font-weight: 700;
  font-size: 1rem;
  color: #ffffff;
  background: var(--zsw-hero-blue, #0066ff);
  border: none;
  padding: 13px 20px;
  border-radius: 8px;
  text-decoration: none;
  display: flex;
  align-items: center;
  justify-content: center;
  width: 100%;
  box-sizing: border-box;
  box-shadow: none;
  transition: background 0.2s ease;
}

.zsw-hero__btn:hover {
  background: var(--zsw-hero-blue-hover, #0052cc);
}

.zsw-hero__stores {
  display: flex;
  gap: 10px;
  align-items: center;
  justify-content: space-between;
  width: 100%;
  box-sizing: border-box;
}

.zsw-hero__stores a {
  flex: 1 1 0px;
  width: calc(50% - 5px);
  max-width: calc(50% - 5px);
  display: block;
  box-sizing: border-box;
  transition: opacity 0.15s ease;
}

.zsw-hero__stores a:hover {
  opacity: 0.9;
}

.zsw-hero__stores img {
  width: 100%;
  height: auto;
  display: block;
  object-fit: contain;
  border-radius: 6px;
}

.zsw-hero__visual {
  display: flex;
  align-items: center;
  justify-content: center;
  position: relative;
  width: 100%;
  min-height: 100%;
  z-index: 3;
}

/* ==========================================================================
   4. Widget: Faq_Section_Widget (.zh3-faq-full)
   ========================================================================== */

.zh3-faq-full .zh3-faq-list {
  display: flex;
  flex-direction: column;
  gap: 16px;
  margin-top: 28px;
}

.zh3-faq-full .zh3-faq-item {
  background: #ffffff;
  border: 1px solid #eef2f6;
  border-radius: 14px;
  overflow: hidden;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.02);
  transition:
    border-color 0.2s ease,
    box-shadow 0.2s ease;
}

.zh3-faq-full .zh3-faq-item.active {
  border-color: #d0e3ff;
  box-shadow: 0 4px 12px rgba(0, 102, 255, 0.05);
}

.zh3-faq-full .zh3-faq-header {
  padding: 14px 22px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  cursor: pointer;
  gap: 16px;
  user-select: none;
}

.zh3-faq-full .zh3-faq-question {
  font-size: 0.98rem;
  font-weight: 600;
  color: #111111;
  margin: 0;
  line-height: 1.45;
}

.zh3-faq-full .zh3-faq-icon {
  width: 32px;
  height: 32px;
  border-radius: 50%;
  background: #eef6ff;
  color: #0066ff;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  transition:
    transform 0.25s ease,
    background 0.2s ease,
    color 0.2s ease;
}

.zh3-faq-full .zh3-faq-item.active .zh3-faq-icon {
  transform: rotate(45deg);
  background: #0066ff;
  color: #ffffff;
}

.zh3-faq-full .zh3-faq-body {
  max-height: 0;
  overflow: hidden;
  transition: max-height 0.35s cubic-bezier(0, 1, 0, 1);
}

.zh3-faq-full .zh3-faq-item.active .zh3-faq-body {
  max-height: 500px;
  transition: max-height 0.35s ease-in-out;
}

.zh3-faq-full .zh3-faq-answer {
  padding: 0 22px 18px 22px;
  font-size: 0.92rem;
  line-height: 1.65;
  color: #4b5563;
  border-top: 1px dashed #eef2f6;
  margin-top: 4px;
  padding-top: 14px;
}

/* ==========================================================================
   5. Widget: Zh3_Emi_Calculator_Widget (.zsw-calc-*)
   ========================================================================== */

.zsw-calc-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 24px;
  margin: 0 0 36px 0;
}

.zsw-calc-card {
  background: #ffffff;
  border-radius: 16px;
  padding: 28px 24px;
  box-shadow:
    0 4px 16px rgba(0, 102, 255, 0.05),
    0 2px 6px rgba(0, 0, 0, 0.03);
  display: flex;
  flex-direction: column;
  gap: 20px;
  border: 1px solid #e2e8f0;
}

.zsw-calc-field {
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.zsw-calc-label {
  font-size: 0.85rem;
  font-weight: 700;
  color: #444444;
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.zsw-calc-amount-display {
  background: #f4f8fc;
  border-radius: 10px;
  padding: 12px 16px;
  font-size: 1.25rem;
  font-weight: 800;
  color: #111111;
}

.zsw-calc-amount-input {
  width: 140px;
  padding: 10px 14px;
  border: 1px solid #dce4f0;
  border-radius: 10px;
  font-weight: 700;
  font-size: 1rem;
  color: #111111;
  outline: none;
  transition: border-color 0.15s ease;
}

.zsw-calc-amount-input:focus {
  border-color: #0066ff;
}

.zsw-calc-rate-badge {
  background: #f0f6ff;
  border: 1.5px solid #bcdcff;
  color: #0066ff;
  border-radius: 10px;
  padding: 6px 14px;
  font-size: 0.92rem;
  font-weight: 700;
  white-space: nowrap;
}

.zsw-calc-slider-track {
  width: 100%;
  height: 6px;
  border-radius: 3px;
  background: #e2e8f0;
  outline: none;
  accent-color: #0066ff;
  cursor: pointer;
}

.zsw-calc-pills-row {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-top: 8px;
}

.zsw-calc-pill-btn {
  border: 1px solid #dce4f0;
  background: #f2f6fc;
  color: #4a5868;
  font-size: 0.92rem;
  font-weight: 600;
  padding: 10px 22px;
  border-radius: 9999px;
  cursor: pointer;
  box-shadow: none;
  outline: none;
  transition: all 0.15s ease;
}

.zsw-calc-pill-btn:hover {
  background: #e5effc;
  color: #0066ff;
  border-color: #bcd5f9;
}

.zsw-calc-pill-btn.active {
  background: #0066ff;
  color: #ffffff;
  border-color: #0066ff;
}

.zsw-calc-emi-banner {
  background: #0066ff;
  border-radius: 16px;
  padding: 20px 24px;
  color: #ffffff;
}

.zsw-calc-emi-label {
  font-size: 0.85rem;
  font-weight: 500;
  opacity: 0.9;
}

.zsw-calc-emi-value {
  font-size: 2.2rem;
  font-weight: 800;
  line-height: 1.1;
  margin-top: 4px;
}

.zsw-calc-summary-table {
  display: flex;
  flex-direction: column;
  gap: 0;
  margin-top: 8px;
  font-size: 0.88rem;
}

.zsw-calc-summary-row {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 14px 0;
  border-bottom: 1px solid #f0f4f8;
  color: #6b7280;
  background: transparent;
}

.zsw-calc-summary-row:last-child {
  border-bottom: none;
}

.zsw-calc-summary-val {
  font-weight: 800;
  color: #111111;
}

.zsw-calc-total-box {
  background: #eefbf2;
  border-radius: 12px;
  padding: 14px 18px;
  display: flex;
  justify-content: space-between;
  align-items: center;
  color: #1e7e34;
  font-weight: 600;
  font-size: 0.88rem;
  margin-top: 14px;
  width: 100%;
  box-sizing: border-box;
}

.zsw-calc-total-val {
  font-size: 1.05rem;
  font-weight: 800;
  color: #1e7e34;
}

/* ==========================================================================
   5b. Widget: Rates_Disclosures_Widget (.zsw-disclosures-card)
   ========================================================================== */

.zsw-disclosures-card {
  background: #f2f7fd;
  border: 1px solid #dce8fa;
  border-radius: 16px;
  padding: 28px 32px;
  box-sizing: border-box;
}

.zsw-disclosures-card p {
  font-size: 0.88rem;
  line-height: 1.65;
  color: #4b5563;
  margin: 0 0 14px;
}

.zsw-disclosures-card p:last-child {
  margin-bottom: 0;
}

.zsw-disclosures-card strong {
  color: #111111;
  font-weight: 600;
}

/* ==========================================================================
   6. Responsive Rules (Targeted Scoped Selectors)
   ========================================================================== */

/* Tablet (1024px) */
@media (max-width: 1024px) {
  .zsw-hero__media-wrap,
  .zsw-hero__visual {
    display: none;
  }

  .zsw-hero__grid {
    grid-template-columns: 1fr;
  }
}

/* Mobile (767px) */
@media (max-width: 767px) {
  .zsw-hero {
    padding: 24px 20px 36px 20px;
    width: 100%;
    box-sizing: border-box;
  }

  .zsw-hero__container,
  .zh3-container {
    width: 100%;
    max-width: 100%;
    box-sizing: border-box;
  }

  .zsw-hero__meta-bar {
    display: flex;
    flex-direction: row;
    flex-wrap: nowrap;
    justify-content: space-between;
    align-items: center;
    gap: 8px;
    margin-bottom: 18px;
    width: 100%;
    box-sizing: border-box;
  }

  .zsw-hero__breadcrumb {
    font-size: 0.78rem;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    flex: 1 1 auto;
    min-width: 0;
    margin: 0;
  }

  .zsw-hero__lang {
    flex-shrink: 0;
    margin-left: auto;
    padding: 4px 8px;
  }

  .zsw-hero__title {
    font-size: 1.75rem;
    line-height: 1.25;
    margin-bottom: 12px;
  }

  .zsw-hero__title-accent {
    font-size: 1.4rem;
    line-height: 1.25;
    margin-bottom: 16px;
  }

  .zsw-hero__cta {
    display: flex;
    flex-direction: column;
    width: 100%;
    max-width: 100%;
    margin-top: 20px;
    gap: 10px;
  }

  .zsw-hero__stores {
    display: flex;
    gap: 10px;
    align-items: center;
    justify-content: space-between;
    width: 100%;
    box-sizing: border-box;
  }

  .zsw-hero__stores a {
    flex: 1 1 0px;
    width: calc(50% - 5px);
    max-width: calc(50% - 5px);
    display: block;
  }

  .zsw-hero__stores img {
    width: 100%;
    height: auto;
    display: block;
    object-fit: contain;
    border-radius: 6px;
  }

  /* Table Card Transformations */
  .zsw__richtext table thead {
    display: none;
  }

  .zsw__richtext table {
    display: block;
    border: none;
    box-shadow: none;
    background: transparent;
    margin: 16px 0 24px 0;
  }

  .zsw__richtext table tbody {
    display: flex;
    flex-direction: column;
    gap: 16px;
    width: 100%;
  }

  .zsw__richtext table tr {
    display: flex;
    flex-direction: column;
    background: #ffffff;
    border: 1px solid #eef2f6;
    border-radius: 16px;
    overflow: hidden;
    box-shadow:
      0 4px 16px rgba(0, 102, 255, 0.05),
      0 2px 6px rgba(0, 0, 0, 0.03);
    padding: 0;
  }

  .zsw__richtext table tr td:first-child {
    background: #0066ff;
    color: #ffffff;
    font-weight: 700;
    font-size: 1rem;
    text-align: center;
    padding: 13px 16px;
    border-bottom: none;
    width: 100%;
    box-sizing: border-box;
  }

  .zsw__richtext table tr td:not(:first-child) {
    display: block;
    position: relative;
    padding: 14px 16px 14px 54%;
    border-bottom: 1px solid #f0f4f8;
    background: #ffffff;
    font-size: 0.88rem;
    font-weight: 500;
    color: #333333;
    width: 100%;
    box-sizing: border-box;
    text-align: right;
    min-height: 48px;
    word-break: normal;
    overflow-wrap: break-word;
  }

  .zsw__richtext table tr td:not(:first-child)::before {
    content: attr(data-label);
    position: absolute;
    left: 16px;
    top: 14px;
    width: 50%;
    font-weight: 600;
    color: #666666;
    font-size: 0.82rem;
    line-height: 1.35;
    text-align: left;
    white-space: normal;
    word-break: normal;
    overflow-wrap: break-word;
  }

  .zsw__richtext table tr td:last-child {
    border-bottom: none;
  }

  .zsw__richtext table td a {
    white-space: nowrap;
    display: inline-block;
    color: #0066ff;
    font-weight: 600;
    text-decoration: underline;
  }

  /* Compact Calculator Overrides */
  .zsw-calc-grid {
    grid-template-columns: 1fr;
    gap: 16px;
    margin: 0 0 24px 0;
  }

  .zsw-calc-card {
    padding: 16px 14px;
    gap: 14px;
    border-radius: 14px;
  }

  .zsw-calc-field {
    gap: 6px;
  }

  .zsw-calc-label {
    font-size: 0.8rem;
  }

  .zsw-calc-amount-display {
    padding: 8px 12px;
    font-size: 1.1rem;
    border-radius: 8px;
  }

  .zsw-calc-rate-badge {
    padding: 4px 10px;
    font-size: 0.8rem;
    border-radius: 8px;
  }

  .zsw-calc-pills-row {
    gap: 6px;
  }

  .zsw-calc-pill-btn {
    padding: 6px 12px;
    font-size: 0.8rem;
    min-height: 34px;
    flex: 1 1 auto;
    text-align: center;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    white-space: nowrap;
    box-sizing: border-box;
  }

  .zsw-calc-emi-banner {
    padding: 14px 16px;
    border-radius: 12px;
  }

  .zsw-calc-emi-label {
    font-size: 0.78rem;
  }

  .zsw-calc-emi-value {
    font-size: 1.75rem;
    margin-top: 2px;
  }

  .zsw-calc-summary-table {
    margin-top: 4px;
    font-size: 0.82rem;
  }

  .zsw-calc-summary-row {
    padding: 10px 0;
  }

  .zsw-calc-total-box {
    padding: 10px 14px;
    font-size: 0.82rem;
    margin-top: 10px;
    border-radius: 10px;
  }

  .zsw-calc-total-val {
    font-size: 0.98rem;
  }

  .zsw-disclosures-card {
    padding: 20px 18px;
    border-radius: 14px;
  }

  .zsw-disclosures-card p {
    font-size: 0.82rem;
    line-height: 1.6;
    margin-bottom: 12px;
  }
}
