/* Homepage hero widget — aligned with switchermate.com .sm-widget comparison card */
.sm-widget {
  --sm-blue: #2e7dd2;
  --sm-blue-light: #5a9de0;
  --sm-blue-dark: #1e5fa8;
  --sm-green: #4ade80;
  --sm-green-light: #6ee89a;
  --sm-green-dark: #22c55e;
  --sm-rgb-blue: 46, 125, 210;
  --sm-rgb-green: 74, 222, 128;
  max-width: 640px;
  margin: 0 auto;
  width: 100%;
  min-width: 0;
  box-sizing: border-box;
}

.sm-widget--outer {
  padding: 1px;
  border-radius: 28px;
  background: linear-gradient(
    180deg,
    rgba(255, 255, 255, 0.08) 0%,
    rgba(255, 255, 255, 0.02) 100%
  );
  box-sizing: border-box;
}

.sm-widget__card {
  border-radius: 27px;
  padding: 20px;
  box-sizing: border-box;
  background: linear-gradient(
    180deg,
    rgba(15, 20, 35, 0.92) 0%,
    rgba(10, 14, 26, 0.95) 100%
  );
  -webkit-backdrop-filter: blur(20px);
  backdrop-filter: blur(20px);
}

.sm-widget .widget {
  background: transparent !important;
  border: none !important;
  box-shadow: none !important;
  padding: 0 !important;
  margin: 0 !important;
  border-radius: 0 !important;
  max-width: none !important;
}

.sm-widget .widget > #p-bb,
.sm-widget .widget > #p-en,
.sm-widget .widget > #p-cm,
.sm-widget .widget > .article-cta-panel {
  background: transparent !important;
}

@keyframes sm-pulse-glow {
  0%,
  100% {
    box-shadow: 0 0 0 0 rgba(var(--sm-rgb-blue), 0.35),
      0 24px 64px -18px rgba(var(--sm-rgb-blue), 0.45);
  }
  50% {
    box-shadow: 0 0 0 10px rgba(var(--sm-rgb-blue), 0),
      0 24px 64px -18px rgba(var(--sm-rgb-blue), 0.55);
  }
}

.sm-widget .tabs.sm-tabs--main {
  display: flex;
  position: relative;
  flex-direction: row;
  align-items: stretch;
  padding: 4px;
  margin-bottom: 1.25rem;
  gap: 0;
  background: rgba(0, 0, 0, 0.4);
  border-radius: 16px;
  border: 1px solid rgba(255, 255, 255, 0.04);
}

.sm-widget .tabs.sm-tabs--main > .sm-tabs__indicator {
  position: absolute;
  left: 4px;
  top: 4px;
  height: calc(100% - 8px);
  width: calc((100% - 8px) / 3);
  border-radius: 12px;
  pointer-events: none;
  z-index: 0;
  transform: translateX(calc(var(--sm-indicator-x, 0) * 100%));
  transition: transform 500ms cubic-bezier(0.22, 1, 0.36, 1), background 0.35s,
    border-color 0.35s, box-shadow 0.35s;
  background: linear-gradient(
    180deg,
    rgba(var(--sm-rgb-blue), 0.22) 0%,
    rgba(var(--sm-rgb-blue), 0.1) 100%
  );
  border: 1px solid rgba(var(--sm-rgb-blue), 0.3);
  box-shadow: 0 4px 20px -4px rgba(var(--sm-rgb-blue), 0.35),
    inset 0 1px 0 rgba(255, 255, 255, 0.08);
}

.sm-widget .tabs.sm-tabs--main[data-active-tab="energy"] > .sm-tabs__indicator {
  background: linear-gradient(
    180deg,
    rgba(var(--sm-rgb-green), 0.22) 0%,
    rgba(var(--sm-rgb-green), 0.1) 100%
  );
  border-color: rgba(var(--sm-rgb-green), 0.3);
  box-shadow: 0 4px 20px -4px rgba(var(--sm-rgb-green), 0.35),
    inset 0 1px 0 rgba(255, 255, 255, 0.08);
}

.sm-widget .tabs.sm-tabs--main > .tab {
  flex: 1;
  min-width: 0;
  position: relative;
  z-index: 1;
  padding: 10px 3px;
  border-radius: 12px;
  font-family: "Manrope", sans-serif;
  font-weight: 600;
  font-size: clamp(0.62rem, 1.65vw, 0.76rem);
  letter-spacing: -0.02em;
  color: rgba(255, 255, 255, 0.45);
  background: transparent !important;
  box-shadow: none !important;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 4px;
  border: none;
  cursor: pointer;
  line-height: 1.15;
  text-align: center;
  white-space: normal;
  word-break: break-word;
  hyphens: auto;
}
@media (min-width: 480px) {
  .sm-widget .tabs.sm-tabs--main > .tab {
    padding: 11px 4px;
    gap: 5px;
    font-size: clamp(0.66rem, 1.4vw, 0.78rem);
  }
}
@media (min-width: 640px) {
  .sm-widget .tabs.sm-tabs--main > .tab {
    padding: 12px 6px;
    font-size: 0.76rem;
    gap: 6px;
  }
}

.sm-widget .tabs.sm-tabs--main > .tab.on {
  color: #fff !important;
}

.sm-widget .tabs.sm-tabs--main > .tab:hover:not(.on) {
  color: rgba(255, 255, 255, 0.75) !important;
  background: rgba(255, 255, 255, 0.04) !important;
}

.sm-widget .sm-tab-ico {
  flex-shrink: 0;
  opacity: 0.9;
}

.sm-widget .s-label {
  font-family: "Manrope", sans-serif;
  display: block;
  color: rgba(255, 255, 255, 0.75);
  font-weight: 600;
  font-size: 0.875rem;
  line-height: 1.5;
  margin: 0 0 0.75rem;
  text-align: center;
  text-transform: none;
  letter-spacing: normal;
}

.sm-widget .btn-search {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 100%;
  box-sizing: border-box;
  font-family: "Manrope", sans-serif !important;
  font-weight: 600 !important;
  font-size: 15px !important;
  border-radius: 16px !important;
  padding: 16px 20px !important;
  background: linear-gradient(
    135deg,
    var(--sm-blue) 0%,
    var(--sm-blue-dark) 100%
  ) !important;
  color: #fff !important;
  text-decoration: none !important;
  border: none !important;
  cursor: pointer;
  animation: sm-pulse-glow 2.4s ease-in-out infinite;
  transition: transform 0.15s ease, filter 0.2s;
}

.sm-widget .btn-search:hover {
  transform: none !important;
}

.sm-widget .btn-search:active {
  transform: scale(0.98) !important;
}

.sm-widget .btn-search .sm-btn-arrow {
  flex-shrink: 0;
  display: inline-flex;
  margin-left: 6px;
}

.sm-widget .btn-search.busy {
  animation: none;
  opacity: 0.65;
}

@media (max-width: 767px) {
  .sm-widget__card {
    padding: 16px;
  }

  .sm-widget .tabs.sm-tabs--main > .tab {
    min-height: 48px;
    padding-top: 8px;
    padding-bottom: 8px;
  }

  .sm-widget .sm-tab-ico {
    width: 12px;
    height: 12px;
    flex-shrink: 0;
    align-self: center;
  }
}

@media (prefers-reduced-motion: reduce) {
  .sm-widget .btn-search {
    animation: none;
  }

  .sm-widget .tabs.sm-tabs--main > .sm-tabs__indicator {
    transition: transform 0.2s ease, background 0.2s, border-color 0.2s,
      box-shadow 0.2s;
  }
}
