/**
 * «Prueba una actividad» — [edas_prueba] y [edas_ven_a_probar].
 * Selectores con prefijo .edas-try para ganar a los estilos genéricos del tema
 * (.page-template h2/img, etc.).
 */
.edas-try {
  --edas-try-accent: #22c55e;
  --edas-try-accent-strong: #4ade80;
  --edas-try-on-accent: #04130a;
  --edas-try-card: #1c1c1e;
  --edas-try-input: #2c2c2e;
  --edas-try-border: rgba(255, 255, 255, 0.12);
  --edas-try-text: var(--edas-text-color, #f5f5f7);
  --edas-try-muted: rgba(255, 255, 255, 0.7);
  --edas-try-soft: rgba(255, 255, 255, 0.65);
  --edas-try-link: var(--edas-color-primary, #60a5fa);
  --edas-try-danger: #f87171;
  color: var(--edas-try-text);
  font-family: var(--edas-font-primary, "Open Sans", system-ui, sans-serif);
  box-sizing: border-box;
  margin: 2rem 0;
}

[data-theme="light"] .edas-try {
  --edas-try-accent: #16a34a;
  --edas-try-accent-strong: #15803d;
  --edas-try-on-accent: #ffffff;
  --edas-try-card: #ffffff;
  --edas-try-input: #f3f4f6;
  --edas-try-border: rgba(0, 0, 0, 0.12);
  --edas-try-muted: rgba(0, 0, 0, 0.68);
  --edas-try-soft: rgba(0, 0, 0, 0.62);
  --edas-try-link: var(--edas-color-primary, #2563eb);
  --edas-try-danger: #b91c1c;
}

.edas-try *,
.edas-try *::before,
.edas-try *::after {
  box-sizing: border-box;
}

.edas-try [hidden] {
  display: none !important;
}

/* Sección de la home: ancho, márgenes y relleno los pone la regla global
   section:not(.t-dialog):not(.t-content) del tema, igual que el resto de widgets de inicio. */
.edas-try.edas-try--section {
  display: flex;
  flex-direction: column;
  gap: 1.75rem;
}

.edas-try .edas-try__header {
  display: flex;
  flex-wrap: wrap;
  align-items: flex-end;
  justify-content: space-between;
  gap: 1.5rem 2rem;
}

.edas-try .edas-try__heading {
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
  max-width: 560px;
}

.edas-try .edas-try__section-title {
  /* Tamaño y peso: los del h2 global del tema, como el resto del documento. */
  margin: 0;
  color: var(--edas-try-text);
}

.edas-try .edas-try__section-text {
  margin: 0;
  font-size: 1.0625rem;
  line-height: 1.55;
  color: var(--edas-try-muted);
}

/* Selector de actividad */
.edas-try .edas-try__tabs {
  display: flex;
  flex-wrap: wrap;
  gap: 0.625rem;
}

.edas-try .edas-try__tab {
  display: inline-flex;
  align-items: center;
  gap: 0.625rem;
  min-height: 52px;
  margin: 0;
  padding: 0 1.25rem 0 0.375rem;
  border-radius: 999px;
  border: 1px solid var(--edas-try-border);
  background: var(--edas-try-card);
  color: var(--edas-try-muted);
  font: inherit;
  font-size: 0.9375rem;
  font-weight: 700;
  line-height: 1;
  white-space: nowrap;
  cursor: pointer;
  box-shadow: none;
  transition: border-color 0.15s ease, background-color 0.15s ease, color 0.15s ease;
}

.edas-try .edas-try__tab:hover {
  color: var(--edas-try-text);
  border-color: var(--edas-try-accent);
}

.edas-try .edas-try__tab[aria-pressed="true"] {
  color: var(--edas-try-text);
  border-color: var(--edas-try-accent);
  background: rgba(34, 197, 94, 0.14);
}

.edas-try .edas-try__tab-img {
  width: 40px;
  height: 40px;
  border-radius: 999px;
  object-fit: cover;
  flex: none;
  margin: 0;
  box-shadow: none;
}

.edas-try .edas-try__tab-img--empty {
  display: block;
  background: var(--edas-try-input);
}

/* Tarjeta */
.edas-try .edas-try__card {
  display: flex;
  flex-wrap: wrap;
  background: var(--edas-try-card);
  border: 1px solid var(--edas-try-border);
  border-radius: 24px;
  overflow: hidden;
}

.edas-try--section .edas-try__card {
  border-radius: 28px;
  min-height: 560px;
}

.edas-try .edas-try__media {
  position: relative;
  flex: 1 1 300px;
  min-height: 260px;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  gap: 1rem;
  padding: 1.5rem;
  background: var(--edas-try-input);
}

.edas-try--section .edas-try__media {
  flex-basis: 480px;
  min-height: 280px;
  justify-content: flex-end;
  padding: 1.75rem;
}

.edas-try .edas-try__img {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  max-width: none;
  margin: 0;
  object-fit: cover;
  border-radius: 0;
  box-shadow: none;
}

.edas-try .edas-try__badge,
.edas-try .edas-try__plate {
  position: relative;
  align-self: flex-start;
  color: #f5f5f7;
  background: rgba(0, 0, 0, 0.72);
}

.edas-try .edas-try__badge {
  padding: 0.375rem 0.75rem;
  border-radius: 999px;
  font-size: 0.75rem;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.edas-try .edas-try__plate {
  display: flex;
  flex-direction: column;
  gap: 0.25rem;
  padding: 1rem 1.125rem;
  border-radius: 16px;
}

.edas-try .edas-try__plate-kicker {
  font-size: 0.8125rem;
  color: rgba(255, 255, 255, 0.78);
}

.edas-try .edas-try__plate-name {
  font-size: 1.875rem;
  line-height: 1.1;
  font-weight: 800;
  color: #4ade80;
}

.edas-try--section .edas-try__plate-name {
  font-size: 2.125rem;
}

.edas-try .edas-try__body {
  flex: 999 1 400px;
  min-width: 0;
  padding: 2.25rem;
}

.edas-try--section .edas-try__body {
  flex-basis: 440px;
  padding: 2.5rem;
}

/* Formulario */
.edas-try .edas-try__form {
  display: flex;
  flex-direction: column;
  gap: 1.125rem;
  margin: 0;
}

.edas-try .edas-try__hp {
  position: absolute;
  left: -9999px;
  width: 1px;
  height: 1px;
  overflow: hidden;
}

.edas-try .edas-try__intro {
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
}

.edas-try .edas-try__title {
  margin: 0;
  font-size: 1.625rem;
  line-height: 1.2;
  font-weight: 800;
  color: var(--edas-try-text);
}

/* En la sección el título de la tarjeta es un h3: tamaño y peso del h3 global del tema. */
.edas-try--section .edas-try__title {
  font-size: clamp(1.35rem, 1.7vw, 1.8rem);
  font-weight: 700;
}

.edas-try .edas-try__text {
  margin: 0;
  font-size: 0.9375rem;
  line-height: 1.55;
  color: var(--edas-try-muted);
}

.edas-try .edas-try__row {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 0.875rem;
}

.edas-try .edas-try__group {
  display: flex;
  flex-direction: column;
  gap: 0.375rem;
  min-width: 0;
}

.edas-try .edas-try__label {
  margin: 0;
  font-size: 0.875rem;
  font-weight: 700;
  color: var(--edas-try-text);
}

.edas-try .edas-try__optional {
  font-weight: 400;
  font-size: 0.75rem;
  color: var(--edas-try-soft);
}

.edas-try .edas-try__field {
  position: relative;
  display: flex;
  align-items: center;
}

.edas-try .edas-try__icon,
.edas-try .edas-try__chev {
  position: absolute;
  left: 14px;
  pointer-events: none;
  color: var(--edas-try-soft);
}

.edas-try .edas-try__chev {
  left: auto;
  right: 14px;
}

.edas-try input.edas-try__input,
.edas-try select.edas-try__input {
  width: 100%;
  height: 50px;
  margin: 0;
  padding: 0 14px 0 42px;
  border-radius: 12px;
  border: 1px solid var(--edas-try-border);
  background: var(--edas-try-input);
  background-image: none;
  color: var(--edas-try-text);
  font: inherit;
  font-size: 0.9375rem;
  line-height: normal;
  box-shadow: none;
  outline: none;
  appearance: none;
  -webkit-appearance: none;
}

.edas-try select.edas-try__input {
  padding: 0 40px 0 14px;
  cursor: pointer;
}

.edas-try .edas-try__input::placeholder {
  color: var(--edas-try-soft);
  opacity: 1;
}

.edas-try .edas-try__input:focus {
  border-color: var(--edas-try-accent);
  box-shadow: 0 0 0 3px rgba(34, 197, 94, 0.25);
}

.edas-try .edas-try__input.is-invalid,
.edas-try .edas-try__check.is-invalid {
  border-color: var(--edas-try-danger);
  box-shadow: 0 0 0 3px rgba(248, 113, 113, 0.2);
}

.edas-try .edas-try__privacy {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  min-height: 44px;
  margin: 0;
  font-size: 0.875rem;
  line-height: 1.4;
  color: var(--edas-try-text);
  cursor: pointer;
}

.edas-try input[type="checkbox"].edas-try__check {
  width: 20px;
  height: 20px;
  margin: 0;
  flex: none;
  appearance: auto;
  -webkit-appearance: checkbox;
  accent-color: var(--edas-try-accent);
  cursor: pointer;
}

.edas-try input[type="checkbox"].edas-try__check::before,
.edas-try input[type="checkbox"].edas-try__check::after {
  content: none;
  display: none;
}

.edas-try .edas-try__privacy a {
  color: var(--edas-try-link);
  font-weight: 700;
  text-decoration: none;
}

.edas-try .edas-try__privacy a:hover {
  text-decoration: underline;
}

.edas-try .edas-try__feedback {
  margin: 0;
  padding: 0.75rem 1rem;
  border-radius: 12px;
  border: 1px solid rgba(248, 113, 113, 0.45);
  background: rgba(248, 113, 113, 0.1);
  color: var(--edas-try-danger);
  font-size: 0.875rem;
  line-height: 1.45;
}

/* Botones */
.edas-try .edas-try__btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.625rem;
  min-height: 52px;
  margin: 0;
  padding: 0 1.5rem;
  border-radius: 999px;
  border: 1px solid transparent;
  font: inherit;
  font-size: 1rem;
  font-weight: 700;
  line-height: 1.2;
  text-align: center;
  cursor: pointer;
  box-shadow: none;
  transition: filter 0.15s ease, background-color 0.15s ease;
}

.edas-try .edas-try__btn:focus-visible,
.edas-try .edas-try__tab:focus-visible {
  outline: 3px solid var(--edas-try-link);
  outline-offset: 3px;
}

.edas-try .edas-try__btn--primary {
  width: 100%;
  background: var(--edas-try-accent);
  color: var(--edas-try-on-accent);
}

.edas-try .edas-try__btn--primary:hover {
  filter: brightness(1.08);
}

.edas-try .edas-try__btn--primary:disabled {
  cursor: progress;
  opacity: 0.7;
}

.edas-try .edas-try__btn--primary.is-loading svg {
  animation: edas-try-nudge 0.8s ease-in-out infinite alternate;
}

@keyframes edas-try-nudge {
  to {
    transform: translateX(4px);
  }
}

.edas-try .edas-try__btn--ghost {
  background: transparent;
  color: var(--edas-try-text);
  border-color: var(--edas-try-border);
}

.edas-try .edas-try__btn--ghost:hover {
  border-color: var(--edas-try-accent);
}

.edas-try .edas-try__note {
  display: flex;
  align-items: center;
  justify-content: center;
  flex-wrap: wrap;
  gap: 0.375rem;
  margin: 0;
  font-size: 0.75rem;
  color: var(--edas-try-soft);
  text-align: center;
}

/* Confirmación */
.edas-try .edas-try__success {
  height: 100%;
  min-height: 320px;
  display: flex;
  flex-direction: column;
  justify-content: center;
  align-items: flex-start;
  gap: 1rem;
  outline: none;
}

.edas-try .edas-try__success-icon {
  width: 60px;
  height: 60px;
  border-radius: 999px;
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--edas-try-accent-strong);
  background: rgba(34, 197, 94, 0.15);
}

.edas-try .edas-try__success-title {
  margin: 0;
  font-size: 1.625rem;
  line-height: 1.2;
  font-weight: 800;
  color: var(--edas-try-text);
}

/* Móvil */
@media (max-width: 767px) {
  .edas-try .edas-try__media,
  .edas-try--section .edas-try__media {
    flex-basis: 100%;
    min-height: 230px;
    padding: 1rem;
  }

  .edas-try .edas-try__card {
    border-radius: 20px;
  }

  .edas-try--section .edas-try__card {
    min-height: 0;
    border-radius: 20px;
  }

  .edas-try .edas-try__plate {
    padding: 0.75rem 0.875rem;
    border-radius: 14px;
  }

  .edas-try .edas-try__plate-name,
  .edas-try--section .edas-try__plate-name {
    font-size: 1.625rem;
  }

  .edas-try .edas-try__body,
  .edas-try--section .edas-try__body {
    flex-basis: 100%;
    padding: 1.5rem 1.25rem 1.75rem;
  }

  .edas-try .edas-try__title {
    font-size: 1.375rem;
  }

  .edas-try .edas-try__row {
    grid-template-columns: minmax(0, 1fr);
    gap: 1.125rem;
  }

  .edas-try input.edas-try__input,
  .edas-try select.edas-try__input {
    height: 52px;
    font-size: 16px; /* evita el zoom de iOS */
  }

  .edas-try .edas-try__btn {
    min-height: 54px;
  }

  .edas-try .edas-try__btn--ghost {
    width: 100%;
  }

  .edas-try .edas-try__success {
    min-height: 0;
    align-items: center;
    text-align: center;
    padding: 1.5rem 0;
  }

  .edas-try .edas-try__tabs {
    flex-wrap: nowrap;
    overflow-x: auto;
    width: 100%;
    padding: 2px 2px 4px;
    scrollbar-width: none;
  }

  .edas-try .edas-try__tabs::-webkit-scrollbar {
    display: none;
  }

  .edas-try .edas-try__tab {
    flex: none;
    min-height: 48px;
    font-size: 0.875rem;
    padding-right: 1rem;
  }

  .edas-try .edas-try__tab-img {
    width: 36px;
    height: 36px;
  }
}

@media (prefers-reduced-motion: reduce) {
  .edas-try .edas-try__btn--primary.is-loading svg {
    animation: none;
  }
}
