/* InnoPet free-sample corner widget */
.innopet-free-sample {
  --fs-navy: #0b2b5a;
  --fs-orange: #f36b1c;
  --fs-line: rgba(15, 40, 80, 0.1);
  --fs-muted: #6b7c93;
  position: fixed;
  right: 14px;
  bottom: 68px;
  z-index: 10045;
  font-family: "Kanit", "Sarabun", sans-serif;
}

.innopet-free-sample__launcher,
.innopet-free-sample__close,
.innopet-free-sample__submit {
  font: inherit;
}

.innopet-free-sample__launcher {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  border: 0;
  border-radius: 999px;
  background: linear-gradient(135deg, var(--fs-navy) 0%, #123f7a 100%);
  color: #fff;
  padding: 10px 14px;
  box-shadow: 0 12px 28px rgba(11, 43, 90, 0.24);
  cursor: pointer;
  font-size: 0.88rem;
  font-weight: 500;
  transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.innopet-free-sample__launcher:hover {
  transform: translateY(-1px);
  box-shadow: 0 14px 30px rgba(11, 43, 90, 0.3);
}

.innopet-free-sample__launcher-icon {
  font-size: 1rem;
  line-height: 1;
}

.innopet-free-sample__panel {
  position: absolute;
  right: 0;
  bottom: calc(100% + 10px);
  width: min(300px, calc(100vw - 28px));
  background:
    radial-gradient(120% 80% at 100% 0%, rgba(243, 107, 28, 0.08), transparent 55%),
    #fff;
  border: 1px solid var(--fs-line);
  border-radius: 18px;
  box-shadow: 0 22px 48px rgba(15, 23, 42, 0.14);
  padding: 14px;
  opacity: 0;
  pointer-events: none;
  transform: translateY(12px) scale(0.98);
  transform-origin: bottom right;
  transition: opacity 0.24s ease, transform 0.24s ease;
}

.innopet-free-sample.is-open .innopet-free-sample__panel {
  opacity: 1;
  pointer-events: auto;
  transform: none;
}

.innopet-free-sample__head {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 8px;
  margin-bottom: 12px;
}

.innopet-free-sample__eyebrow {
  margin: 0;
  font-size: 0.72rem;
  font-weight: 600;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  color: var(--fs-orange);
}

.innopet-free-sample__title {
  margin: 2px 0 0;
  font-size: 1.05rem;
  font-weight: 600;
  color: var(--fs-navy);
}

.innopet-free-sample__sub {
  margin: 4px 0 0;
  font-size: 0.82rem;
  color: var(--fs-muted);
  line-height: 1.35;
}

.innopet-free-sample__close {
  border: 0;
  background: transparent;
  color: #94a3b8;
  font-size: 1.4rem;
  line-height: 1;
  cursor: pointer;
  padding: 0 2px;
}

.innopet-free-sample__choices {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 8px;
  margin-bottom: 12px;
}

.innopet-free-sample__choice {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 4px;
  padding: 8px 6px 10px;
  border: 1.5px solid var(--fs-line);
  border-radius: 14px;
  cursor: pointer;
  text-align: center;
  transition: border-color 0.15s ease, box-shadow 0.15s ease;
}

.innopet-free-sample__choice input {
  position: absolute;
  opacity: 0;
  pointer-events: none;
}

.innopet-free-sample__choice img {
  width: 88px;
  height: 88px;
  object-fit: contain;
}

@media (min-width: 641px) {
  .innopet-free-sample__panel {
    width: min(400px, calc(100vw - 28px));
    padding: 16px;
  }

  .innopet-free-sample__choices {
    gap: 12px;
    margin-bottom: 14px;
  }

  .innopet-free-sample__choice {
    gap: 6px;
    padding: 12px 10px 14px;
  }

  .innopet-free-sample__choice img {
    width: 100%;
    max-width: 148px;
    height: auto;
    aspect-ratio: 1;
    min-height: 132px;
  }

  .innopet-free-sample__choice-name {
    font-size: 0.86rem;
  }

  .innopet-free-sample__choice-size {
    font-size: 0.78rem;
  }
}

.innopet-free-sample__choice-name {
  font-size: 0.78rem;
  font-weight: 600;
  color: var(--fs-navy);
  line-height: 1.25;
}

.innopet-free-sample__choice-size {
  font-size: 0.72rem;
  color: var(--fs-muted);
}

.innopet-free-sample__choice.is-active {
  border-color: var(--fs-orange);
  box-shadow: 0 0 0 1px rgba(243, 107, 28, 0.15);
}

.innopet-free-sample__submit {
  width: 100%;
  border: 0;
  border-radius: 12px;
  background: linear-gradient(135deg, var(--fs-orange) 0%, #e85a10 100%);
  color: #fff;
  padding: 11px 14px;
  font-size: 0.95rem;
  font-weight: 600;
  cursor: pointer;
  box-shadow: 0 8px 18px rgba(243, 107, 28, 0.24);
}

.innopet-free-sample__submit:disabled {
  opacity: 0.7;
  cursor: wait;
}

.innopet-free-sample__status {
  margin: 8px 0 0;
  font-size: 0.8rem;
  color: #dc2626;
  text-align: center;
}

@media (max-width: 640px) {
  .innopet-free-sample {
    right: 10px;
    bottom: 62px;
  }

  .innopet-free-sample__launcher-text {
    display: none;
  }

  .innopet-free-sample__launcher {
    padding: 11px 12px;
  }
}

@media (prefers-reduced-motion: reduce) {
  .innopet-free-sample__panel,
  .innopet-free-sample__launcher {
    transition: none;
  }
}
