.form-icon-sprite {
  position: absolute;
  width: 0;
  height: 0;
  overflow: hidden;
}

.form-icon {
  display: inline-block;
  width: 1.25rem;
  height: 1.25rem;
  flex: 0 0 auto;
  fill: none;
  stroke: currentColor;
  stroke-width: 2;
  stroke-linecap: round;
  stroke-linejoin: round;
  vertical-align: middle;
}

.form-icon-close {
  width: 1.5rem;
  height: 1.5rem;
}

.form-icon-large,
.form-icon-celebration {
  width: 2.25rem;
  height: 2.25rem;
}

:root {
  --demo-blue-start: #08459d;
  --demo-blue-mid: #0769cf;
  --demo-blue-end: #168fe9;
  --demo-orange: #ff8a32;
  --demo-ink: #10233d;
  --demo-field-shadow: 0 14px 24px -16px rgba(255, 105, 42, 0.95);
}

.demo-card {
  background:
    radial-gradient(circle at 2% 100%, rgba(59, 130, 246, 0.045), transparent 34%),
    radial-gradient(circle at 98% 100%, rgba(249, 115, 22, 0.05), transparent 34%),
    #ffffff;
}

.demo-card .field-label {
  color: var(--demo-ink);
  font-family: 'JetBrains Mono', ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, monospace;
  font-size: 0.72rem;
  font-weight: 600;
  letter-spacing: 0.11em;
}

.demo-card .input-focus-ring:focus-within .field-label {
  color: #075bb7;
}

.demo-card input.demo-field-orange,
.demo-card select.demo-field-orange,
.demo-card input.demo-field-orange.field-filled,
.demo-card select.demo-field-orange.field-filled {
  background: linear-gradient(105deg, var(--demo-blue-start) 0%, var(--demo-blue-mid) 50%, var(--demo-blue-end) 100%);
  border-color: rgba(9, 105, 207, 0.95);
  color: #ffffff;
  caret-color: #ffffff;
  -webkit-text-fill-color: #ffffff;
  box-shadow: var(--demo-field-shadow);
}

.demo-card input.demo-field-orange:hover,
.demo-card input.demo-field-orange:focus,
.demo-card select.demo-field-orange:hover,
.demo-card select.demo-field-orange:focus,
.demo-card input.demo-field-orange.field-filled:hover,
.demo-card input.demo-field-orange.field-filled:focus,
.demo-card select.demo-field-orange.field-filled:hover,
.demo-card select.demo-field-orange.field-filled:focus {
  background: linear-gradient(105deg, #073d8c 0%, #0872dc 50%, #1b9bf4 100%);
  border-color: #ff9a52;
  color: #ffffff;
  -webkit-text-fill-color: #ffffff;
  box-shadow: 0 17px 28px -17px rgba(255, 105, 42, 1);
}

.demo-card input.demo-field-orange::placeholder,
.demo-card input.demo-field-orange.field-filled::placeholder {
  color: rgba(255, 255, 255, 0.92);
  -webkit-text-fill-color: rgba(255, 255, 255, 0.92);
}

.demo-card input.demo-field-orange:-webkit-autofill,
.demo-card input.demo-field-orange:-webkit-autofill:hover,
.demo-card input.demo-field-orange:-webkit-autofill:focus {
  -webkit-box-shadow: 0 0 0 1000px #0769cf inset, var(--demo-field-shadow);
  -webkit-text-fill-color: #ffffff;
  caret-color: #ffffff;
  border-color: rgba(9, 105, 207, 0.95);
}

.demo-card input.demo-field-orange.border-red-400,
.demo-card select.demo-field-orange.border-red-400 {
  border-color: #ef4444;
  box-shadow: 0 0 0 2px rgba(239, 68, 68, 0.16), var(--demo-field-shadow);
}

.demo-card select.demo-field-orange option {
  background: #ffffff;
  color: var(--demo-ink);
  -webkit-text-fill-color: var(--demo-ink);
}

.demo-card span.demo-field-icon,
.demo-card .input-focus-ring.is-filled .demo-field-icon {
  color: #ffe4b5;
}

.demo-card .country-trigger {
  background: rgba(255, 255, 255, 0.96);
  border-color: #dbe4ef;
  color: var(--demo-ink);
  box-shadow: 0 10px 24px -20px rgba(15, 35, 61, 0.55);
}

.demo-card .country-trigger:hover,
.demo-card .country-dropdown-container.open .country-trigger {
  background: #ffffff;
  border-color: #8bbcf0;
}

.demo-card #submit-demo.btn-premium-cta {
  background: linear-gradient(100deg, #0a438e 0%, #33558d 24%, #95646d 56%, #ff8b32 100%);
  box-shadow: 0 17px 34px -20px rgba(255, 105, 42, 0.95);
}

.demo-card #submit-demo.btn-premium-cta:hover:not(:disabled) {
  background: linear-gradient(100deg, #073777 0%, #2e5797 24%, #aa665f 57%, #ff7620 100%);
  box-shadow: 0 22px 38px -18px rgba(255, 105, 42, 1);
  filter: none;
}

.demo-card #submit-demo:disabled {
  opacity: 0.62;
}

.demo-card #submit-demo:not(:disabled) {
  opacity: 1;
}

@media (max-width: 640px) {
  .demo-card .field-label {
    font-size: 0.66rem;
    letter-spacing: 0.085em;
  }

  .demo-card input.demo-field-orange,
  .demo-card select.demo-field-orange,
  .demo-card .country-trigger {
    min-height: 3.35rem;
  }
}

/* Selector de país integrado con el campo de teléfono */
.demo-card .phone-field-row {
  display: grid;
  grid-template-columns: 8.25rem minmax(0, 1fr);
  gap: 0.55rem;
  align-items: start;
}

.demo-card .country-dropdown-container {
  width: 100%;
}

.demo-card .country-trigger {
  width: 100%;
  min-height: 3.625rem;
  padding: 0 0.9rem;
  background: linear-gradient(105deg, var(--demo-blue-start) 0%, var(--demo-blue-mid) 58%, var(--demo-blue-end) 100%);
  border-color: rgba(9, 105, 207, 0.95);
  color: #ffffff;
  box-shadow: var(--demo-field-shadow);
}

.demo-card .country-trigger:hover,
.demo-card .country-dropdown-container.open .country-trigger {
  background: linear-gradient(105deg, #073d8c 0%, #0872dc 55%, #1b9bf4 100%);
  border-color: #ff9a52;
  box-shadow: 0 17px 28px -17px rgba(255, 105, 42, 1);
}

.demo-card .country-trigger .country-flag,
.demo-card .country-option .country-flag {
  border: 1px solid rgba(15, 35, 61, 0.12);
}

.demo-card .country-dropdown-list {
  top: calc(100% + 0.4rem);
  width: min(18rem, calc(100vw - 4rem));
  border: 1px solid #dbe4ef;
  border-radius: 1.1rem;
  box-shadow: 0 18px 45px -18px rgba(15, 35, 61, 0.42);
}

.demo-card .country-dropdown-list > div:first-child {
  padding: 0.65rem;
  border-bottom-width: 1px;
}

.demo-card .country-search {
  height: 2.55rem;
  padding-top: 0;
  padding-bottom: 0;
  border-radius: 0.8rem;
}

.demo-card .country-dropdown-list > div:last-child {
  max-height: 11.5rem;
  padding: 0.3rem;
}

.demo-card .country-option {
  min-height: 2.75rem;
  gap: 0.65rem;
  padding: 0.55rem 0.7rem;
  border-left-width: 3px;
  border-radius: 0.65rem;
}

.demo-card .country-option:hover {
  transform: none;
}

.demo-card .country-option + .country-option {
  border-top: 1px solid #f1f5f9;
}

@media (max-width: 640px) {
  .demo-card .phone-field-row {
    grid-template-columns: 7.25rem minmax(0, 1fr);
  }

  .demo-card .country-trigger {
    gap: 0.45rem;
    padding-inline: 0.7rem;
  }

  .demo-card .country-dropdown-list {
    width: min(17rem, calc(100vw - 3rem));
  }
}
