/*
 * APT-PLANS-PROMOTIONS-1A — launch-trial upgrade panel, related items, house slots.
 * Visual reference: owner-approved Figma Make prototype "Interactive Upgrade Experience" (GT0JGQNZaGBqgmLx9Q1pF5),
 * translated to scoped apt-cx-* / apt-rel-* / apt-slot-* rules on the site's own font. No global styles.
 */

.apt-cx {
	--apt-cx-navy: #061538;
	--apt-cx-blue: #0877f9;
	--apt-cx-blue-dark: #0865d9;
	--apt-cx-orange: #ff681d;
	--apt-cx-yellow: #ffb000;
	--apt-cx-green: #19bf78;
	--apt-cx-muted: #5e687b;
	--apt-cx-line: #e7e8e7;
	--apt-cx-soft: #f7f6f3;
	--apt-cx-r-sm: 12px;
	--apt-cx-r-md: 18px;
	--apt-cx-shadow: 0 8px 28px rgba(11, 24, 55, .06);
	position: relative;
	color: var(--apt-cx-navy);
	text-align: left;
	margin: 24px 0 0;
}
.apt-cx *, .apt-cx *::before, .apt-cx *::after { box-sizing: border-box; }
.apt-cx-icon { flex: 0 0 auto; display: block; }
.apt-cx button { font-family: inherit; }
.apt-cx button:focus-visible, .apt-cx a:focus-visible { outline: 3px solid rgba(8, 119, 249, .35); outline-offset: 3px; }

/* Head: ready block + listing card */
.apt-cx__head { display: flex; justify-content: space-between; align-items: center; gap: 24px; margin: 0 0 10px; }
.apt-cx__ready { display: flex; align-items: center; gap: 20px; min-width: 0; }
.apt-cx__mark { display: grid; flex: 0 0 62px; width: 62px; height: 62px; place-items: center; border-radius: 50%; color: #fff; background: var(--apt-cx-green); border: 12px solid #ddf8ec; }
.apt-cx__title { margin: 0; font-size: 27px; line-height: 1.15; letter-spacing: -.8px; font-weight: 800; color: var(--apt-cx-navy); }
.apt-cx__lead { margin: 5px 0 0; color: var(--apt-cx-muted); font-size: 16px; line-height: 1.5; }
.apt-cx__listing { display: flex; flex: 0 1 400px; min-width: 0; min-height: 96px; padding: 10px; border: 1px solid var(--apt-cx-line); border-radius: var(--apt-cx-r-md); background: rgba(255, 255, 255, .85); }
.apt-cx__listing img, .apt-cx__listing-ph { flex: 0 0 84px; width: 84px; height: 76px; object-fit: cover; border-radius: 10px; }
.apt-cx__listing-ph { display: grid; place-items: center; color: var(--apt-cx-orange); background: #fff0e8; }
.apt-cx__listing-body { min-width: 0; padding: 2px 12px; }
.apt-cx__listing-body > strong { display: block; font-size: 16px; overflow-wrap: anywhere; }
.apt-cx__listing-meta { display: flex; flex-wrap: wrap; gap: 4px 16px; margin-top: 7px; color: var(--apt-cx-muted); font-size: 13px; }
.apt-cx__listing-meta span { display: inline-flex; align-items: center; gap: 5px; }

.apt-cx__trial { display: flex; flex-wrap: wrap; align-items: center; gap: 6px 10px; margin: 0 0 14px; color: var(--apt-cx-muted); font-size: 14px; line-height: 1.45; }
.apt-cx__badge { display: inline-block; padding: 3px 10px; border-radius: 99px; background: #e3f1ff; color: var(--apt-cx-blue-dark); font-size: 12px; font-weight: 700; }

/* Tabs */
.apt-cx__tabs { display: grid; grid-template-columns: repeat(3, 1fr); border: 1px solid #e3e2df; border-radius: var(--apt-cx-r-md); background: var(--apt-cx-soft); overflow: hidden; }
.apt-cx__tabs:has(> :nth-child(2):last-child) { grid-template-columns: repeat(2, 1fr); }
.apt-cx__tab { position: relative; display: flex; min-height: 72px; align-items: center; gap: 16px; padding: 10px 26px; border: 0; border-right: 1px solid #deddd9; border-radius: 0; color: #606060; text-align: left; background: transparent; cursor: pointer; }
.apt-cx__tab:last-child { border-right: 0; }
.apt-cx__tab.is-active { z-index: 1; margin: -1px; color: var(--apt-cx-navy); border: 1.5px solid var(--apt-cx-orange); border-radius: var(--apt-cx-r-md); background: #fff; box-shadow: 0 5px 12px rgba(11, 24, 55, .04); }
.apt-cx__tab-icon { display: grid; flex: 0 0 46px; width: 46px; height: 46px; place-items: center; border-radius: 50%; background: #efeeeb; }
.apt-cx__tab.is-active .apt-cx__tab-icon { color: var(--apt-cx-orange); background: #fff0e8; }
.apt-cx__tab-text strong { display: block; color: inherit; font-size: 17px; line-height: 1.2; }
.apt-cx__tab-text small { display: block; margin-top: 3px; font-size: 13px; }
.apt-cx__tab-dot { position: absolute; top: 8px; right: 9px; display: grid; width: 20px; height: 20px; place-items: center; color: #fff; border-radius: 50%; background: var(--apt-cx-blue); }
.apt-cx__tab-dot[hidden] { display: none; }

/* Panels */
.apt-cx__panel { padding-top: 22px; }
.apt-cx__panel[hidden] { display: none; }
.apt-cx__section-head { margin-bottom: 18px; }
.apt-cx__section-head h3 { margin: 0; font-size: 24px; line-height: 1.2; letter-spacing: -.6px; font-weight: 800; color: var(--apt-cx-navy); }
.apt-cx__section-head p { margin: 5px 0 0; color: var(--apt-cx-muted); font-size: 15px; line-height: 1.5; }
.apt-cx__grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 22px; }
.apt-cx__grid--1 { grid-template-columns: minmax(0, 420px); justify-content: center; }
.apt-cx__grid--2 { grid-template-columns: repeat(2, minmax(0, 1fr)); }

/* Offer cards */
.apt-cx__card { position: relative; display: flex; flex-direction: column; min-width: 0; padding: 24px 20px 16px; border: 1px solid #eeeeec; border-radius: var(--apt-cx-r-md); background: rgba(255, 255, 255, .92); box-shadow: var(--apt-cx-shadow); transition: transform 180ms ease, border-color 180ms ease, box-shadow 180ms ease; }
.apt-cx__card--popular { border: 1.5px solid var(--apt-cx-blue); background: linear-gradient(145deg, #f0f8ff 0, #fff 72%); }
.apt-cx__card.is-selected { border-color: var(--apt-cx-blue); box-shadow: 0 10px 28px rgba(8, 119, 249, .14); }
.apt-cx__popular { position: absolute; top: -15px; left: 50%; padding: 5px 20px; transform: translateX(-50%); color: #fff; border-radius: 99px; background: var(--apt-cx-blue); font-size: 13px; font-weight: 700; white-space: nowrap; }
.apt-cx__card-intro { display: flex; align-items: center; gap: 16px; }
.apt-cx__card-icon { display: grid; flex: 0 0 58px; width: 58px; height: 58px; place-items: center; border-radius: 50%; }
.apt-cx__card--orange .apt-cx__card-icon { color: var(--apt-cx-orange); background: #fff0e8; }
.apt-cx__card--blue .apt-cx__card-icon { color: var(--apt-cx-blue); background: #dceeff; }
.apt-cx__card--yellow .apt-cx__card-icon { color: var(--apt-cx-yellow); background: #fff6dc; }
.apt-cx__card h4 { margin: 0; font-size: 20px; line-height: 1.2; font-weight: 800; letter-spacing: -.4px; color: var(--apt-cx-navy); }
.apt-cx__card-intro p { margin: 3px 0 0; color: var(--apt-cx-muted); font-size: 14px; line-height: 1.4; }
.apt-cx__price { margin: 12px 0 0 74px; font-size: 29px; line-height: 1.1; font-weight: 800; letter-spacing: -1px; }
.apt-cx__billing { margin: 3px 0 10px 74px; color: var(--apt-cx-muted); font-size: 14px; }
.apt-cx__features { display: grid; gap: 7px; margin: 0 0 16px; padding: 0; list-style: none; font-size: 14px; line-height: 1.3; }
.apt-cx__features li { display: flex; align-items: flex-start; gap: 10px; margin: 0; }
.apt-cx__features li span { display: grid; flex: 0 0 18px; width: 18px; height: 18px; place-items: center; color: #fff; border-radius: 50%; }
.apt-cx__card--orange .apt-cx__features li span { background: var(--apt-cx-orange); }
.apt-cx__card--blue .apt-cx__features li span { background: var(--apt-cx-blue); }
.apt-cx__card--yellow .apt-cx__features li span { background: var(--apt-cx-yellow); }
.apt-cx__card-action { margin-top: auto; }

/* Buttons */
.apt-cx__btn { display: inline-flex; width: 100%; min-height: 46px; align-items: center; justify-content: center; gap: 8px; padding: 10px 20px; border: 1.5px solid var(--apt-cx-navy); border-radius: var(--apt-cx-r-sm); color: var(--apt-cx-navy); background: #fff; font-size: 15px; font-weight: 700; line-height: 1.2; cursor: pointer; transition: transform 160ms ease, background 160ms ease, border-color 160ms ease, box-shadow 160ms ease; }
.apt-cx__btn:hover { border-color: var(--apt-cx-blue); color: var(--apt-cx-blue); }
.apt-cx__btn--primary, .apt-cx__btn[aria-pressed="true"] { border-color: transparent; color: #fff; background: linear-gradient(135deg, var(--apt-cx-blue), var(--apt-cx-blue-dark)); box-shadow: 0 7px 18px rgba(8, 119, 249, .2); }
.apt-cx__btn--primary:hover, .apt-cx__btn[aria-pressed="true"]:hover { color: #fff; }
.apt-cx__btn:disabled { opacity: .6; cursor: default; }
.apt-cx__btn .apt-cx__btn-on { display: none; align-items: center; gap: 6px; }
.apt-cx__btn[aria-pressed="true"] .apt-cx__btn-on { display: inline-flex; }
.apt-cx__btn[aria-pressed="true"] .apt-cx__btn-off { display: none; }
.apt-cx__link { border: 0; padding: 0; color: #076dde; background: transparent; font-weight: 700; font-size: 14px; text-decoration: underline; cursor: pointer; }
.apt-cx__state { display: flex; align-items: center; gap: 6px; margin: 4px 0; font-size: 14px; font-weight: 700; line-height: 1.4; }
.apt-cx__state--on { color: #11804f; }
.apt-cx__state--wait { color: #8a5a00; }
.apt-cx__note { padding: 14px 16px; border-radius: var(--apt-cx-r-sm); background: var(--apt-cx-soft); color: var(--apt-cx-muted); font-size: 15px; line-height: 1.5; }
.apt-cx__more { margin: 14px 0 0; }

/* Free path */
.apt-cx__free { display: flex; align-items: center; justify-content: space-between; gap: 24px; margin-top: 18px; padding: 12px 20px; border: 1px solid var(--apt-cx-line); border-radius: var(--apt-cx-r-md); background: rgba(255, 255, 255, .92); box-shadow: 0 4px 14px rgba(11, 24, 55, .03); }
.apt-cx__free-msg { display: flex; align-items: center; gap: 16px; min-width: 0; }
.apt-cx__free-icon { display: grid; flex: 0 0 50px; width: 50px; height: 50px; place-items: center; color: #656565; border-radius: 50%; background: #f0efec; }
.apt-cx__free h3 { margin: 0; font-size: 18px; font-weight: 800; color: var(--apt-cx-navy); }
.apt-cx__free p { margin: 2px 0 0; color: var(--apt-cx-muted); font-size: 13px; line-height: 1.45; }
.apt-cx__free-btn { display: inline-flex; flex: 0 0 auto; min-height: 48px; min-width: 240px; align-items: center; justify-content: center; gap: 8px; padding: 10px 22px; border: 0; border-radius: var(--apt-cx-r-sm); color: var(--apt-cx-navy); background: var(--apt-cx-soft); font-size: 15px; font-weight: 700; text-decoration: none; cursor: pointer; }
.apt-cx__free-btn:hover { color: var(--apt-cx-blue); }

/* Summary bar */
.apt-cx__summary { position: sticky; z-index: 20; bottom: 0; margin: 18px -4px 0; padding: 12px 18px; border: 1px solid #dfe2e7; border-radius: var(--apt-cx-r-md) var(--apt-cx-r-md) 0 0; background: rgba(255, 255, 255, .96); box-shadow: 0 -10px 30px rgba(11, 24, 55, .08); }
.apt-cx__summary[hidden] { display: none; }
.apt-cx__summary-inner { display: flex; align-items: center; justify-content: space-between; gap: 24px; }
.apt-cx__summary-copy, .apt-cx__summary-action { display: flex; align-items: center; gap: 14px; min-width: 0; }
.apt-cx__summary-count { display: grid; flex: 0 0 40px; width: 40px; height: 40px; place-items: center; color: #fff; border-radius: 50%; background: var(--apt-cx-orange); font-weight: 800; }
.apt-cx__summary-copy strong, .apt-cx__summary-copy small, .apt-cx__summary-action small { display: block; }
.apt-cx__summary-copy small, .apt-cx__summary-action small { margin-top: 2px; color: var(--apt-cx-muted); font-size: 12px; }
.apt-cx__summary-action > span { text-align: right; }
.apt-cx__summary-action > span strong { display: block; font-size: 22px; line-height: 1.1; }
.apt-cx__summary-action .apt-cx__btn { width: auto; }
.apt-cx__summary-msg { margin: 6px 0 0; font-size: 13px; color: var(--apt-cx-muted); }
.apt-cx__summary-msg:empty { display: none; }
.apt-cx__summary.is-done .apt-cx__summary-inner { display: none; }

/* Post-publish: the panel sits inside the page's narrow success card; it takes the prototype's full content width,
   centred on the card (which is centred on the page). */
.apt-cx--post_publish { position: relative; z-index: 1; width: min(1180px, calc(100vw - 32px)); margin-left: calc(50% - min(590px, 50vw - 16px)); margin-top: 32px; padding: 28px 0 8px; border-top: 1px solid var(--apt-cx-line); background: #fff; box-shadow: 0 0 0 16px #fff; }
.apt-cx--post_publish .apt-cx__head { margin-bottom: 6px; }

/* Modal context (dashboard) */
/* HivePress sizes .hp-modal at 380px; the upgrade panel needs the prototype's width. */
.hp-modal.apt-cx-modal { width: min(1100px, calc(100vw - 24px)) !important; max-width: 1100px !important; padding: 28px 28px 0 !important; box-sizing: border-box; }
.hp-modal.apt-cx-modal .hp-modal__content { width: 100%; max-width: none; }
@media (max-width: 720px) {
	.hp-modal.apt-cx-modal { padding: 20px 14px 0 !important; }
}
.apt-cx--modal { margin: 0; }

@media (max-width: 980px) {
	.apt-cx__head { align-items: stretch; }
	.apt-cx__tab { padding-inline: 16px; gap: 12px; }
	.apt-cx__tab-text small { display: none; }
	.apt-cx__grid { gap: 14px; }
	.apt-cx__card { padding: 22px 16px 15px; }
	.apt-cx__card-icon { flex-basis: 48px; width: 48px; height: 48px; }
	.apt-cx__price, .apt-cx__billing { margin-left: 64px; }
	.apt-cx__free { align-items: flex-start; }
	.apt-cx__free-btn { min-width: 210px; }
}

/* Below 768px the site runs inside the app shell with a fixed bottom navigation: keep the summary above it. */
@media (max-width: 767px) {
	.apt-cx__summary { bottom: calc(var(--apt-pwa-nav-h, 68px) + env(safe-area-inset-bottom, 0px)); }
}

@media (max-width: 720px) {
	.apt-cx__head { display: block; }
	.apt-cx__ready { align-items: flex-start; gap: 14px; }
	.apt-cx__mark { flex-basis: 48px; width: 48px; height: 48px; border-width: 8px; }
	.apt-cx__title, .apt-cx__section-head h3 { font-size: 22px; }
	.apt-cx__lead, .apt-cx__section-head p { font-size: 14px; }
	.apt-cx__listing { margin-top: 14px; min-height: 84px; }
	.apt-cx__listing img, .apt-cx__listing-ph { flex-basis: 72px; width: 72px; height: 64px; }
	.apt-cx__tab { min-height: 64px; flex-direction: column; justify-content: center; gap: 4px; padding: 8px 4px; text-align: center; }
	.apt-cx__tab-icon { flex-basis: 34px; width: 34px; height: 34px; }
	.apt-cx__tab-icon svg { width: 20px; height: 20px; }
	.apt-cx__tab-text strong { font-size: 12px; }
	.apt-cx__tab-dot { top: 4px; right: 4px; width: 17px; height: 17px; }
	.apt-cx__grid, .apt-cx__grid--1, .apt-cx__grid--2 { grid-template-columns: 1fr; gap: 20px; }
	.apt-cx__card--popular { margin-top: 8px; }
	.apt-cx__free { display: block; padding: 15px; }
	.apt-cx__free-btn { width: 100%; min-width: 0; margin-top: 14px; }
	.apt-cx__summary { margin-inline: -8px; padding: 10px 12px; }
	.apt-cx__summary-inner { flex-direction: column; align-items: stretch; gap: 8px; }
	.apt-cx__summary-copy { display: none; }
	.apt-cx__summary-action { justify-content: space-between; }
	.apt-cx__summary-action .apt-cx__btn { flex: 1; }
}

@media (prefers-reduced-motion: reduce) {
	.apt-cx *, .apt-cx *::before, .apt-cx *::after { transition-duration: .01ms !important; animation-duration: .01ms !important; }
}

/* Related items + house slot */
.apt-rel { margin: 32px 0 0; }
.apt-rel__title { font-size: 18px; margin: 0 0 12px; }
.apt-rel__grid { list-style: none; margin: 0; padding: 0; display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 12px; }
.apt-rel__card { border: 1px solid #e3e8ef; border-radius: 12px; overflow: hidden; background: #fff; margin: 0; }
.apt-rel__card a { display: block; color: inherit; text-decoration: none; height: 100%; }
.apt-rel__img { display: block; width: 100%; aspect-ratio: 4 / 3; object-fit: cover; background: #f1f4f8; }
.apt-rel__body { display: block; padding: 10px 12px; }
.apt-rel__name { display: block; font-weight: 600; font-size: 14px; line-height: 1.35; overflow-wrap: anywhere; }
.apt-rel__meta { display: block; font-size: 13px; color: #5b6b80; margin-top: 4px; }
@media (min-width: 768px) {
	.apt-rel__grid { grid-template-columns: repeat(4, minmax(0, 1fr)); }
}

.apt-slot { margin: 24px 0 0; padding: 14px 16px; border: 1px dashed #c9d3e0; border-radius: 12px; background: #f7f9fc; }
.apt-slot__label { display: block; font-size: 11px; text-transform: uppercase; letter-spacing: .06em; color: #5b6b80; margin-bottom: 4px; }
.apt-slot__title { display: block; font-weight: 600; margin: 0 0 4px; }
.apt-slot__body { margin: 0 0 6px; font-size: 14px; }
