/* Embed license purchase page (/pages/embed-tutors).
   Builds on template.css, topic-navigation.css and info-pages.css; only the
   pricing, checkout and live-preview pieces are defined here. Class names
   follow js/embed-tutor-product.js. */

.embed-hero-points {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 8px;
  margin: 16px auto 0;
  padding: 0;
  list-style: none;
}

.embed-hero-points li {
  padding: 6px 12px;
  background: #ffffff;
  border: 1px solid #dce7f3;
  border-radius: 999px;
  color: #365477;
  font-size: .86rem;
  font-weight: 700;
}

.embed-hero-link {
  display: inline-block;
  margin-top: 14px;
  color: #2f5f96;
  font-weight: 800;
  text-decoration: none;
}

.embed-hero-link:hover,
.embed-hero-link:focus-visible {
  text-decoration: underline;
}

/* The page script toggles the `hidden` attribute on elements that also have a
   display value here (price grid, success details), so make it always win. */
.embed-product-section [hidden] {
  display: none !important;
}

.info-page .embed-product-section .section-intro {
  margin-bottom: 16px;
}

/* Plans */
.price-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(min(100%, 14rem), 1fr));
  gap: 14px;
}

.price-card {
  position: relative;
  display: flex;
  flex-direction: column;
  padding: 20px 18px 16px;
  background: #f7faff;
  border: 2px solid #dce7f3;
  border-radius: 14px;
  cursor: pointer;
  transition: border-color .16s, box-shadow .16s, transform .16s;
}

.price-card:hover {
  border-color: #9fbbe0;
  transform: translateY(-1px);
}

.price-card:focus-visible {
  outline: 3px solid #9fbbe0;
  outline-offset: 2px;
}

.price-card.is-selected {
  background: #ffffff;
  border-color: #3f73c9;
  box-shadow: 0 8px 22px rgba(63, 115, 201, .16);
}

.info-page .price-card p {
  margin: 0;
}

.plan-badge {
  align-self: flex-start;
  margin-bottom: 8px;
  padding: 3px 10px;
  background: #fff4d6;
  border-radius: 999px;
  color: #7a5200;
  font-size: .74rem;
  font-weight: 800;
  letter-spacing: .02em;
}

.info-page .price-card .price-label {
  color: #6880a4;
  font-size: .78rem;
  font-weight: 850;
  letter-spacing: .08em;
  text-transform: uppercase;
}

.info-page .price-card .price {
  margin: 4px 0 10px;
  color: #304a69;
  font-size: 2rem;
  font-weight: 800;
  line-height: 1.1;
}

.price-period {
  color: #6880a4;
  font-size: 1rem;
  font-weight: 700;
}

.info-page .price-card .price-list {
  flex: 1;
  margin: 0 0 14px;
  padding-left: 1.1rem;
}

.info-page .price-card .price-list li {
  font-size: .93rem;
  line-height: 1.5;
}

.choose-plan {
  display: block;
  padding: 10px 12px;
  background: #edf5ff;
  border-radius: 10px;
  color: #2d5fae;
  font-weight: 800;
  text-align: center;
}

.price-card.is-selected .choose-plan {
  background: #3f73c9;
  color: #ffffff;
}

/* Website form */
.license-box {
  margin-top: 18px;
  padding: 18px;
  background: #f7faff;
  border: 1px solid #dce7f3;
  border-radius: 14px;
}

.selected-plan {
  display: none;
  margin-bottom: 12px;
  padding: 10px 12px;
  background: #edf5ff;
  border-radius: 10px;
  color: #2d5fae;
  font-size: .93rem;
  font-weight: 700;
}

.selected-plan.is-visible {
  display: block;
}

.license-box label {
  display: block;
  margin-bottom: 6px;
  color: #304a69;
  font-weight: 800;
}

.license-box input[type="url"] {
  box-sizing: border-box;
  width: 100%;
  min-height: 46px;
  padding: 0 14px;
  border: 1px solid #b9cbe2;
  border-radius: 10px;
  background: #ffffff;
  color: #172033;
  font: inherit;
  font-size: 1rem;
}

.license-box input[type="url"]:focus {
  outline: 3px solid #cfe0f7;
  border-color: #3f73c9;
}

.info-page .license-box .license-help {
  margin: 8px 0 14px;
  font-size: .9rem;
}

.checkout-button,
.copy-embed-button {
  min-height: 46px;
  padding: 0 20px;
  border: 0;
  border-radius: 11px;
  background: #3f73c9;
  color: #ffffff;
  font: inherit;
  font-size: .95rem;
  font-weight: 800;
  cursor: pointer;
}

.checkout-button:hover,
.copy-embed-button:hover {
  background: #2d5fae;
}

.checkout-button:disabled {
  opacity: .65;
  cursor: progress;
}

.info-page .checkout-message {
  min-height: 1.4em;
  margin: 10px 0 0;
  color: #2d5fae;
  font-weight: 700;
}

.info-page .checkout-message.is-error,
.info-page .purchase-success-lead.is-error {
  color: #b42318;
}

/* Purchase success */
.purchase-success {
  text-align: left;
}

.purchase-success-icon {
  display: grid;
  place-items: center;
  width: 44px;
  height: 44px;
  margin-bottom: 10px;
  background: #e8f6ee;
  border-radius: 50%;
  color: #1c7c4a;
  font-size: 1.3rem;
  font-weight: 900;
}

.purchase-success-details {
  display: grid;
  gap: 8px;
  margin: 14px 0;
  padding: 14px 16px;
  background: #f7faff;
  border: 1px solid #dce7f3;
  border-radius: 12px;
}

.purchase-success-details > div {
  display: flex;
  flex-wrap: wrap;
  gap: 4px 12px;
  justify-content: space-between;
}

.purchase-success-details span {
  color: #6880a4;
  font-size: .9rem;
  font-weight: 700;
}

.purchase-success-details strong,
.purchase-success-details code {
  color: #304a69;
  overflow-wrap: anywhere;
}

.embed-code-result label {
  display: block;
  margin-bottom: 6px;
  color: #304a69;
  font-weight: 800;
}

.embed-code-result textarea {
  box-sizing: border-box;
  width: 100%;
  margin-bottom: 10px;
  padding: 12px;
  border: 1px solid #b9cbe2;
  border-radius: 10px;
  background: #f7faff;
  color: #172033;
  min-height: 8rem;
  font: .85rem/1.5 ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
  resize: vertical;
}

.info-page .copy-embed-status {
  min-height: 1.4em;
  margin: 8px 0 0;
  color: #1c7c4a;
  font-weight: 700;
}

/* Live preview */
.preview-frame-wrap {
  overflow: hidden;
  margin-top: 12px;
  border: 1px solid #dce7f3;
  border-radius: 14px;
}

.preview-frame {
  display: block;
  width: 100%;
  height: 900px;
  border: 0;
}

.info-page .preview-narrow-note {
  display: none;
}

/* The Tutor needs about 300px. When the site's main column is narrower
   (e.g. ~800-1000px windows with both sidebars), link to the preview instead. */
@container topic-hub (max-width: 300px) {
  .preview-frame-wrap {
    display: none;
  }

  .info-page .preview-narrow-note {
    display: block;
  }
}

.info-page .info-section code {
  padding: 1px 5px;
  background: #f3f7fc;
  border-radius: 5px;
  font-size: .9em;
}


/* Existing-customer billing path */
.info-page .purchase-manage-link {
  margin: -4px 0 16px;
  color: #6880a4;
  font-size: .92rem;
  text-align: center;
}

.purchase-manage-link a {
  color: #2f5f96;
  font-weight: 800;
}

.billing-management-hero .billing-portal-button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 46px;
  margin-top: 16px;
  padding: 0 20px;
  border-radius: 11px;
  background: #3f73c9;
  color: #ffffff;
  font-weight: 800;
  text-decoration: none;
}

.billing-management-hero .billing-portal-button:hover,
.billing-management-hero .billing-portal-button:focus-visible {
  background: #2d5fae;
  color: #ffffff;
  text-decoration: none;
}

.info-page .billing-verification-note {
  max-width: 640px;
  margin: 10px auto 0;
  color: #6880a4;
  font-size: .9rem;
}

.billing-actions {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 12px;
  margin-top: 16px;
}

.billing-action {
  padding: 16px;
  background: #f7faff;
  border: 1px solid #dce7f3;
  border-radius: 12px;
}

.billing-action strong {
  display: block;
  margin-bottom: 4px;
  color: #304a69;
}

.billing-action span {
  color: #58708f;
  font-size: .93rem;
  line-height: 1.5;
}

.info-page .billing-license-note {
  margin: 18px 0 0;
  padding: 12px 14px;
  background: #f3f7fc;
  border-radius: 10px;
  color: #4f6684;
}

@media (max-width: 640px) {
  .billing-actions {
    grid-template-columns: 1fr;
  }

  .billing-management-hero .billing-portal-button {
    width: 100%;
  }
}
