.fsce-widget-host {
  max-width: 100% !important;
}

.fsce-widget,
.fsce-widget * {
  box-sizing: border-box;
}

.fsce-widget button,
.fsce-widget input {
  font-family: inherit;
}

.fsce-widget {
  max-width: 670px;
  margin: 0;
  font-family: "Open Sans", "Helvetica Neue", Helvetica, Arial, sans-serif;
  color: #013b58;
  text-align: left;
  direction: ltr;
  unicode-bidi: isolate;
  border-radius: 8px;
}

.fsce-search-wrap {
  text-align: left;
  position: relative;
  overflow-anchor: none; /* Reduces iOS scroll jitter when typing */
}

.fsce-input-wrap {
  position: relative;
  z-index: 100;
}

.fsce-search-row {
  display: flex;
  align-items: stretch;
  gap: 0;
  border-radius: 8px;
  background: #fff;
  overflow: hidden;
}

.fsce-search-row:focus-within {
  border-color: #3f79c6;
  box-shadow: 0 0 0 3px rgba(63, 121, 198, 0.15);
}

.fsce-search-row:focus-within .fsce-cta-inline {
  display: none;
}

.fsce-widget .fsce-input {
  flex: 1;
  min-width: 0;
  font-size: 16px;
  font-family: inherit;
  color: #013b58;
  background: #fff;
  border: none;
  border-radius: 0;
  padding: 16px 18px;
  outline: none;
  box-sizing: border-box;
  direction: ltr !important;
  text-align: left !important;
  unicode-bidi: plaintext !important;
}

.fsce-cta-inline {
  flex-shrink: 0;
  padding: 10px 16px;
  font-size: 16px;
  font-weight: 700;
  font-family: inherit;
  color: #fff;
  background: radial-gradient(ellipse at center, #213bf7, #173dff);
  border: none;
  border-radius: 6px;
  cursor: pointer;
  white-space: nowrap;
  appearance: none;
  height: 40px;
  align-self: center;
  margin-right: 12px;
}

.fsce-cta-inline:hover {
  background: #0248a9;
}

/* Mobile: shown below search; desktop: hidden */
.fsce-cta-inline-below {
  display: none;
  text-decoration: none;
  cursor: pointer;
  text-align: center;
}

.fsce-widget .fsce-input::placeholder {
  color: #9cb9c8;
  direction: ltr !important;
  unicode-bidi: plaintext;
}

.fsce-input:focus {
  outline: none;
}

.fsce-widget .fsce-dropdown {
  display: none;
  position: absolute;
  top: 100%;
  left: 0;
  right: 0;
  margin-top: 2px;
  background: #fff !important;
  border: 1px solid #dce6f0;
  border-radius: 0 0 8px 8px;
  box-shadow: 0 8px 24px rgba(0, 0, 0, 0.1);
  z-index: 1000;
  max-height: 320px;
  overflow-y: auto;
  direction: ltr !important;
  text-align: left;
  unicode-bidi: plaintext;
}

.fsce-widget .fsce-dropdown-visible {
  display: block;
}

.fsce-widget .fsce-option {
  display: block;
  width: 100%;
  padding: 14px 16px;
  font-size: 14px;
  font-family: inherit;
  color: #013b58 !important;
  background: #fff !important;
  border: none;
  border-bottom: 1px solid #f0f4f8;
  cursor: pointer;
  text-align: left !important;
  direction: ltr !important;
  unicode-bidi: plaintext;
  line-height: 1.4;
  appearance: none;
}

.fsce-widget .fsce-option:last-child {
  border-bottom: none;
}

.fsce-widget .fsce-option:hover {
  background-color: #e6f0ff !important;
}

.fsce-loading-msg,
.fsce-no-results {
  padding: 24px 16px;
  color: #4f7a90;
  font-size: 14px;
  text-align: center;
}

.fsce-no-results b {
  font-weight: 700;
}

.fsce-spinner {
  position: absolute;
  right: 14px;
  top: 50%;
  transform: translateY(-50%);
  width: 20px;
  height: 20px;
  border: 2px solid #d1e0f8;
  border-top-color: #3f79c6;
  border-radius: 50%;
  animation: fsce-spin 0.8s linear infinite;
}

@keyframes fsce-spin {
  to {
    transform: translateY(-50%) rotate(360deg);
  }
}

.fsce-card {
  width: fit-content;
  margin: 0 auto;
  background: #ffffff;
  border-radius: 16px;
  border: 1px solid #e6f0f6;
  padding: 28px;
  text-align: left;
  box-sizing: border-box;
}

.fsce-card-loading {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 12px;
  padding: 48px 28px;
}

.fsce-card-loading .fsce-spinner {
  position: relative;
  right: auto;
  top: auto;
  transform: none;
  animation: fsce-spin-rotate 0.8s linear infinite;
}

@keyframes fsce-spin-rotate {
  to {
    transform: rotate(360deg);
  }
}

.fsce-card-title {
  font-size: 24px;
  font-weight: 700;
  color: #002945;
  margin-bottom: 14px;
  margin-top: 0;
}

.fsce-address-row {
  display: flex;
  align-items: center;
  gap: 8px;
  margin-bottom: 20px;
}

/* Figma address icon: 40×40, rounded rect #E6F0FF + path #0248A9 */
.fsce-address-icon {
  width: 40px;
  height: 40px;
  flex-shrink: 0;
  background: url("data:image/svg+xml,%3Csvg width='40' height='40' viewBox='0 0 40 40' fill='none' xmlns='http://www.w3.org/2000/svg'%3E%3Crect width='40' height='40' rx='8.57143' fill='%23E6F0FF'/%3E%3Cg clip-path='url(%23clip0_10250_5774)'%3E%3Cpath d='M29.5238 15.8333V32.5H10.4762V15.8333M33.0953 18.2143L20 7.5L6.90479 18.2143M23.5715 32.5V20.5952H16.4286V32.5' stroke='%230248A9' stroke-width='2.14286' stroke-miterlimit='10' stroke-linecap='round' stroke-linejoin='round'/%3E%3C/g%3E%3Cdefs%3E%3CclipPath id='clip0_10250_5774'%3E%3Crect width='28.5714' height='28.5714' fill='white' transform='translate(5.71436 5.71484)'/%3E%3C/clipPath%3E%3C/defs%3E%3C/svg%3E")
    center / 40px 40px no-repeat;
}

.fsce-address-text {
  font-size: 20px;
  font-weight: 400;
  color: #002945;
}

.fsce-savings-content {
  display: flex;
  flex-direction: row;
  gap: 16px;
  width: fit-content;
  box-sizing: border-box;
  background: #e6f0ff;
  border-radius: 8px;
  padding: 20px;
  margin-bottom: 24px;
}

.fsce-map-wrap {
  width: 180px;
  height: 195px;
  flex-shrink: 0;
  border-radius: 8px;
  overflow: hidden;
  background: #e0e8f0;
}

.fsce-map-placeholder {
  width: 180px;
  height: 195px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 13px;
  color: #4f7a90;
}

.fsce-map-placeholder.fsce-map-empty {
  background: #f5f8fc;
}

.fsce-map-img {
  width: 180px;
  height: 195px;
  object-fit: cover;
  border-radius: 8px;
}

.fsce-savings-info {
  flex: 1;
  min-width: 0;
}

.fsce-savings-value-row {
  display: flex;
  flex-direction: row;
  gap: 40px;
  margin-bottom: 40px;
}

.fsce-savings-label {
  font-size: 24px;
  font-weight: 700;
  color: #002945;
  max-width: 180px;
  line-height: 140%;
  align-self: center;
}

.fsce-savings-amount {
  font-size: 56px;
  font-weight: 700;
  color: #0248a9;
  line-height: 140%;
}

.fsce-savings-unavailable {
  font-size: 18px;
  font-weight: 600;
  color: #3f79c6;
  margin-bottom: 8px;
}

.fsce-savings-desc {
  font-size: 16px;
  color: #1f4e66;
  margin: 0;
  line-height: 1.5;
}

.fsce-disclaimer {
  font-size: 12px;
  color: #1f4e66;
  line-height: 1.5;
  margin-bottom: 24px;
}

.fsce-cta {
  display: block;
  max-width: 300px;
  margin: 0 auto;
  padding: 14px 32px;
  font-size: 20px;
  font-weight: 700;
  font-family: inherit;
  color: #fff;
  background: radial-gradient(ellipse at center, #213bf7, #173dff);
  border-radius: 8px;
  text-align: center;
  text-decoration: none;
  box-sizing: border-box;
}

.fsce-cta:hover {
  background-color: #0248a9;
  color: #fff;
}

.fsce-change-row {
  margin: 20px 0 0 0;
  font-size: 16px;
  color: #ffffff;
  text-align: center;
}

.fsce-widget .fsce-change-link {
  font-size: 16px;
  font-weight: 700;
  color: #ffffff !important;
  background: transparent !important;
  border: none;
  cursor: pointer;
  text-decoration: underline;
  padding: 0;
  appearance: none;
  margin-left: 4px;
}

.fsce-widget .fsce-change-link:hover,
.fsce-widget .fsce-change-link:focus {
  color: #f5f8fc !important;
  background: transparent !important;
  outline: none;
}

@media (max-width: 768px) {
  .fsce-widget {
    justify-self: center;
    width: 100%;
  }

  .fsce-search-row .fsce-cta-inline {
    display: none;
  }

  /* When below button is shown, remove radius between row and button */
  .fsce-search-row {
    border-radius: 8px 8px 0 0;
  }

  .fsce-cta-inline-below {
    display: block;
    width: 100%;
    margin: 0;
    padding: 16px 18px;
    height: 54px;
    box-sizing: border-box;
    border-radius: 0 0 8px 8px;
  }

  .fsce-search-wrap:focus-within .fsce-cta-inline-below {
    display: none;
  }

  /* When below button is hidden (input focused), restore full radius on row */
  .fsce-search-wrap:focus-within .fsce-search-row {
    border-radius: 8px;
  }

  .fsce-card {
    max-width: 327px;
    width: 100%;
    padding: 24px;
  }

  .fsce-card-title,
  .fsce-savings-label {
    font-size: 20px;
  }

  .fsce-address-text {
    font-size: 16px;
  }

  .fsce-savings-content {
    flex-direction: column;
    padding: 16px;
  }

  .fsce-map-wrap,
  .fsce-map-placeholder,
  .fsce-map-img {
    width: 247px;
    height: 145px;
  }

  .fsce-savings-value-row {
    flex-direction: column;
    gap: 8px;
    margin-bottom: 8px;
  }

  .fsce-savings-label {
    max-width: 100%;
  }

  .fsce-savings-amount {
    font-size: 48px;
  }

  .fsce-savings-desc {
    font-size: 14px;
  }

  .fsce-change-row {
    font-size: 16px;
  }

  .fsce-widget .fsce-change-link {
    font-size: 16px;
    margin-left: 0;
  }
}
