/*
 * Orbit Store Manager — customer portal + shortcodes ([orbit_pricing], [orbit_free_download], [orbit_changelog]).
 * OBS design tokens, self-contained and scoped under .obs-portal so it looks the same inside any theme
 * and never restyles theme elements. Mobile first, 44px tap targets. Toast + confirm dialog styles for
 * the OBS UI kit JS are included because the admin kit CSS is not loaded on the front end.
 */
@font-face { font-family: "OBS Inter"; font-weight: 400 700; font-style: normal; font-display: swap; src: url(../obs-ui/fonts/inter-var.woff2) format("woff2"); }
@font-face { font-family: "OBS Poppins"; font-weight: 600; font-style: normal; font-display: swap; src: url(../obs-ui/fonts/poppins-600.woff2) format("woff2"); }
@font-face { font-family: "OBS Poppins"; font-weight: 700; font-style: normal; font-display: swap; src: url(../obs-ui/fonts/poppins-700.woff2) format("woff2"); }

.obs-portal, .obs-toasts, .obs-modal {
	--obs-navy: #0E2F56; --obs-navy-2: #12396A; --obs-midnight: #081D38;
	--obs-gold: #D39A30; --obs-gold-d: #B8821F; --obs-cream: #FBF3E4;
	--obs-mist: #EEF3F9; --obs-paper: #F6F8FC; --obs-line: #E1E8F1; --obs-line-2: #CFD9E6;
	--obs-ink: #1B2A41; --obs-slate: #5B6B82; --obs-muted: #8593A8;
	--obs-ok: #0C7A4E; --obs-ok-bg: #E3F4EC; --obs-warn: #8A5A00; --obs-warn-bg: #FBF0D9;
	--obs-bad: #B42318; --obs-bad-bg: #FDECEA; --obs-info: #1E5AA8; --obs-info-bg: #E6EEFA;
	--obs-r: 12px; --obs-r-lg: 16px;
	--obs-shadow: 0 1px 2px rgba(14, 47, 86, .06), 0 8px 24px -12px rgba(14, 47, 86, .18);
	--obs-font: "OBS Inter", Inter, system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
	--obs-display: "OBS Poppins", Poppins, var(--obs-font);
}
.obs-portal { font-family: var(--obs-font); color: var(--obs-ink); font-size: 15px; line-height: 1.55; -webkit-font-smoothing: antialiased; box-sizing: border-box; }
.obs-portal *, .obs-portal *::before, .obs-portal *::after { box-sizing: border-box; }
.obs-portal h3, .obs-portal h4 { font-family: var(--obs-display); color: var(--obs-navy); letter-spacing: -.01em; line-height: 1.25; margin: 0; }
.obs-portal p { margin: 0; }
.obs-portal code { font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace; background: none; color: inherit; padding: 0; border: 0; }
.obs-portal :focus-visible { outline: 2px solid var(--obs-gold); outline-offset: 2px; border-radius: 8px; }

/* ---------- Buttons (own classes: theme .button styles never apply) ---------- */
.obs-portal .ostore-btn, .obs-modal .obs-btn {
	display: inline-flex; align-items: center; justify-content: center; gap: 8px;
	min-height: 44px; padding: 0 18px; margin: 0; border-radius: 12px; border: 1px solid transparent;
	font: 600 14px/1 var(--obs-font); letter-spacing: 0; text-transform: none; text-decoration: none; text-shadow: none; box-shadow: none;
	cursor: pointer; white-space: nowrap; transition: background .15s, border-color .15s, color .15s, transform .05s; width: auto;
}
.obs-portal .ostore-btn:active { transform: translateY(1px); }
.obs-portal .ostore-btn--primary, .obs-modal .obs-btn--primary { background: var(--obs-navy); color: #fff; }
.obs-portal .ostore-btn--primary:hover, .obs-modal .obs-btn--primary:hover { background: var(--obs-navy-2); color: #fff; }
.obs-portal .ostore-btn--gold { background: var(--obs-gold); color: var(--obs-midnight); }
.obs-portal .ostore-btn--gold:hover { background: var(--obs-gold-d); color: #fff; }
.obs-portal .ostore-btn--ghost, .obs-modal .obs-btn--ghost { background: #fff; color: var(--obs-navy); border-color: var(--obs-line-2); }
.obs-portal .ostore-btn--ghost:hover, .obs-modal .obs-btn--ghost:hover { border-color: var(--obs-navy); color: var(--obs-navy); background: #fff; }
.obs-portal .ostore-btn--danger { background: #fff; color: var(--obs-bad); border-color: #F3C1BC; }
.obs-portal .ostore-btn--danger:hover { background: var(--obs-bad-bg); color: var(--obs-bad); }
.obs-portal .ostore-btn--sm { min-height: 36px; padding: 0 12px; font-size: 13px; border-radius: 10px; }
.obs-portal .ostore-btn[disabled], .obs-portal .ostore-btn.is-busy { opacity: .7; pointer-events: none; }
.obs-portal .ostore-btn.is-busy::before { content: ""; width: 14px; height: 14px; border-radius: 50%; border: 2px solid currentColor; border-right-color: transparent; animation: ostore-spin .7s linear infinite; }
.obs-portal .ostore-copy.is-copied { color: var(--obs-ok); border-color: var(--obs-ok); }
.obs-portal .ostore-input { min-height: 44px; padding: 8px 14px; border: 1px solid var(--obs-line-2); border-radius: 12px; background: #fff; color: var(--obs-ink); font: 500 15px var(--obs-font); width: 100%; box-shadow: none; margin: 0; }
.obs-portal .ostore-input:focus { border-color: var(--obs-gold); box-shadow: 0 0 0 3px rgba(211, 154, 48, .2); outline: 0; }

/* ---------- Pills ---------- */
.obs-portal .obs-pill { display: inline-flex; align-items: center; gap: 6px; padding: 4px 10px; border-radius: 999px; font: 600 12px/1.3 var(--obs-font); background: var(--obs-mist); color: var(--obs-navy); white-space: nowrap; }
.obs-portal .obs-pill--dot::before { content: ""; width: 6px; height: 6px; border-radius: 50%; background: currentColor; }
.obs-portal .obs-pill--ok { background: var(--obs-ok-bg); color: var(--obs-ok); }
.obs-portal .obs-pill--warn { background: var(--obs-warn-bg); color: var(--obs-warn); }
.obs-portal .obs-pill--bad { background: var(--obs-bad-bg); color: var(--obs-bad); }
.obs-portal .obs-pill--info { background: var(--obs-info-bg); color: var(--obs-info); }
.obs-portal .obs-pill--pro { background: var(--obs-cream); color: var(--obs-gold-d); }

/* ---------- Licence cards ---------- */
.ostore-cards { display: grid; grid-template-columns: minmax(0, 1fr); gap: 16px; margin: 0 0 24px; }
.ostore-lcard { position: relative; border: 1px solid var(--obs-line); border-radius: var(--obs-r-lg); padding: 18px; background: #fff; display: flex; flex-direction: column; gap: 14px; box-shadow: var(--obs-shadow); overflow: hidden; }
.ostore-lcard::before { content: ""; position: absolute; left: 0; top: 0; right: 0; height: 3px; background: linear-gradient(90deg, var(--obs-navy), var(--obs-gold)); }
.ostore-lcard--expired::before, .ostore-lcard--suspended::before, .ostore-lcard--revoked::before { background: var(--obs-line-2); }
.ostore-lcard--free::before { background: var(--obs-ok); }
.ostore-lcard.is-updated { animation: ostore-flash 1.6s ease-out; }
.ostore-lcard__head { display: flex; justify-content: space-between; align-items: flex-start; gap: 10px; }
.ostore-lcard__head h3 { font-size: 17px; }
.ostore-lcard__plan { display: block; color: var(--obs-slate); font-size: 13px; margin-top: 2px; }
.ostore-lcard__key { display: flex; align-items: center; gap: 10px; background: var(--obs-paper); border: 1px dashed var(--obs-line-2); border-radius: var(--obs-r); padding: 8px 8px 8px 14px; }
.ostore-lcard__key code { flex: 1; min-width: 0; font-size: 14px; font-weight: 600; letter-spacing: .05em; color: var(--obs-navy); word-break: break-all; }
.ostore-lcard__meta { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 10px; margin: 0; }
.ostore-lcard__meta div { min-width: 0; background: var(--obs-paper); border-radius: 10px; padding: 8px 10px; }
.ostore-lcard__meta dt { font-size: 11px; text-transform: uppercase; letter-spacing: .05em; color: var(--obs-slate); margin: 0; font-weight: 600; }
.ostore-lcard__meta dd { margin: 2px 0 0; font-weight: 700; color: var(--obs-navy); font-variant-numeric: tabular-nums; }
.ostore-lcard__note { margin: 0; padding: 10px 12px; border-radius: 10px; background: var(--obs-info-bg); color: var(--obs-info); font-size: 14px; }
.ostore-lcard__note--warn { background: var(--obs-warn-bg); color: var(--obs-warn); }
.ostore-lcard__note--bad { background: var(--obs-bad-bg); color: var(--obs-bad); }
.ostore-lcard__desc { margin: 0; color: var(--obs-slate); font-size: 14px; }
.ostore-lcard__devices h4 { margin: 0 0 6px; font: 600 11px/1.4 var(--obs-font); text-transform: uppercase; letter-spacing: .05em; color: var(--obs-slate); }
.ostore-lcard__devices ul { list-style: none; margin: 0; padding: 0; }
.ostore-lcard__devices li { display: flex; align-items: center; justify-content: space-between; flex-wrap: wrap; gap: 8px; padding: 10px 0; border-top: 1px solid var(--obs-line); margin: 0; }
.ostore-lcard__site { min-width: 0; word-break: break-word; }
.ostore-lcard__site strong { color: var(--obs-ink); }
.ostore-lcard__site small { display: block; color: var(--obs-muted); font-size: 12px; }
.ostore-tag { display: inline-block; font-size: 11px; font-weight: 600; padding: 1px 8px; border-radius: 999px; background: var(--obs-mist); color: var(--obs-navy-2); vertical-align: middle; }
.ostore-lcard__actions { display: flex; flex-wrap: wrap; gap: 8px; margin-top: auto; }
.ostore-lcard__actions .ostore-inline-form { flex: 1 1 100%; }
.ostore-lcard__actions .ostore-btn { width: 100%; }
.ostore-inline-form { display: inline-flex; margin: 0; }
.ostore-portal__h { margin: 28px 0 12px !important; font-size: 18px; }
.ostore-confirm { border: 1px solid var(--obs-gold); background: var(--obs-cream); border-radius: var(--obs-r-lg); padding: 16px 18px; margin: 0 0 16px; display: flex; flex-direction: column; gap: 12px; }
.ostore-empty-portal { padding: 32px 20px; text-align: center; border: 1px dashed var(--obs-line-2); border-radius: var(--obs-r-lg); margin-bottom: 24px; background: var(--obs-paper); display: flex; flex-direction: column; align-items: center; gap: 8px; }
.ostore-empty-portal__icon { width: 52px; height: 52px; border-radius: 14px; display: grid; place-items: center; background: var(--obs-mist); color: var(--obs-navy); font-size: 22px; }
.ostore-empty-portal p { color: var(--obs-slate); margin-bottom: 8px; }

/* Claim */
.ostore-claim { margin: 0 0 24px; padding: 18px; border: 1px solid var(--obs-line); border-radius: var(--obs-r-lg); background: #fff; display: flex; flex-direction: column; gap: 12px; }
.ostore-claim__text h3 { font-size: 15px; margin-bottom: 2px; }
.ostore-claim__text label { color: var(--obs-slate); font-size: 14px; font-weight: 400; }
.ostore-claim__row { display: flex; flex-direction: column; gap: 8px; }
.ostore-claim .ostore-input { font-family: ui-monospace, SFMono-Regular, Menlo, monospace; text-transform: uppercase; letter-spacing: .04em; }

/* ---------- Pricing ---------- */
.ostore-pricing { display: grid; gap: 18px; grid-template-columns: minmax(0, 1fr); align-items: stretch; margin: 28px 0 8px; }
.ostore-plan { position: relative; display: flex; flex-direction: column; border: 1px solid var(--obs-line); border-radius: 20px; padding: 28px 22px 22px; background: #fff; text-align: left; box-shadow: var(--obs-shadow); transition: transform .15s ease, box-shadow .15s ease; }
.ostore-plan:hover { transform: translateY(-2px); box-shadow: 0 2px 4px rgba(14, 47, 86, .05), 0 18px 40px -18px rgba(14, 47, 86, .3); }
.ostore-plan--featured { background: linear-gradient(160deg, var(--obs-navy), var(--obs-midnight)); border-color: var(--obs-navy); color: #E7EDF5; }
.ostore-plan--featured .ostore-plan__name, .ostore-plan--featured .ostore-plan__price { color: #fff; }
.ostore-plan--featured .ostore-plan__per, .ostore-plan--featured .ostore-plan__tax { color: #B9C7DA; }
.ostore-plan--featured .ostore-plan__features li { border-top-color: rgba(255, 255, 255, .12); }
.ostore-plan__badge { position: absolute; top: -12px; left: 22px; background: var(--obs-gold); color: var(--obs-midnight); font: 700 12px/1 var(--obs-font); padding: 6px 12px; border-radius: 999px; white-space: nowrap; }
.ostore-plan__name { margin: 0 0 12px; font-size: 18px; }
.ostore-plan__price { font: 700 34px/1.1 var(--obs-display); color: var(--obs-navy); font-variant-numeric: tabular-nums; }
.ostore-plan__price del { display: block; font-size: 15px; font-weight: 500; opacity: .6; }
.ostore-plan__price ins { text-decoration: none; background: none; }
.ostore-plan__price .amount { color: inherit; }
.ostore-plan__tax { font: 500 13px var(--obs-font); color: var(--obs-slate); white-space: nowrap; }
.ostore-plan__per { color: var(--obs-slate); font-size: 14px; margin: 6px 0 18px; }
.ostore-plan__features { list-style: none; margin: 0 0 22px; padding: 0; flex: 1; }
.ostore-plan__features li { position: relative; padding: 9px 0 9px 26px; border-top: 1px solid var(--obs-line); margin: 0; font-size: 14px; }
.ostore-plan__features li::before { content: ""; position: absolute; left: 4px; top: 15px; width: 10px; height: 6px; border-left: 2px solid var(--obs-gold); border-bottom: 2px solid var(--obs-gold); transform: rotate(-45deg); }
.ostore-plan__sites { font-weight: 700; }
.obs-portal .ostore-plan__buy { width: 100%; min-height: 48px; }
.ostore-pricing__note { text-align: center; color: var(--obs-slate); font-size: 13px; margin: 8px 0 0; }

/* ---------- Free download ---------- */
.ostore-free-dl { display: inline-flex; flex-wrap: wrap; align-items: center; gap: 10px; margin: 0; }
.ostore-free-dl__meta, .ostore-free-dl__msg { color: var(--obs-slate); font-size: 13px; }
.ostore-free-dl__msg:empty { display: none; }
.ostore-free-dl__msg.is-error { color: var(--obs-bad); }

/* ---------- Changelog ---------- */
.ostore-changelog h4 { margin: 1.4em 0 .5em; padding-top: 1em; border-top: 1px solid var(--obs-line); font-size: 16px; }
.ostore-changelog h4:first-child { border-top: 0; padding-top: 0; margin-top: 0; }
.ostore-changelog ul { margin: .3em 0 0; padding-left: 1.2em; }
.ostore-changelog li { margin: .25em 0; }
.ostore-sc-error { padding: 10px 14px; border-left: 4px solid #B42318; background: #FDECEA; color: #B42318; border-radius: 8px; }

/* ---------- Toasts + confirm dialog (OBS UI kit JS) ---------- */
.obs-toasts { position: fixed; right: 16px; bottom: 16px; left: 16px; display: flex; flex-direction: column; align-items: flex-end; gap: 10px; z-index: 100001; pointer-events: none; }
.obs-toast { pointer-events: auto; display: flex; gap: 10px; align-items: flex-start; max-width: 380px; width: 100%; background: var(--obs-midnight); color: #fff; border-radius: 12px; padding: 12px 14px; box-shadow: 0 20px 40px -16px rgba(0, 0, 0, .45); font: 500 14px/1.45 var(--obs-font); animation: ostore-in .2s ease-out; }
.obs-toast::before { content: ""; flex: 0 0 8px; height: 8px; margin-top: 7px; border-radius: 50%; background: var(--obs-gold); }
.obs-toast--ok::before { background: #3DD68C; }
.obs-toast--bad::before { background: #FF7A6E; }
.obs-toast button { margin-left: auto; background: none; border: 0; color: #B9C7DA; cursor: pointer; font-size: 18px; line-height: 1; padding: 0 2px; min-height: 0; box-shadow: none; }
.obs-modal { position: fixed; inset: 0; background: rgba(8, 29, 56, .55); display: grid; place-items: center; z-index: 100002; padding: 20px; animation: ostore-fade .15s; }
.obs-modal__box { background: #fff; border-radius: 18px; max-width: 440px; width: 100%; padding: 22px; box-shadow: 0 40px 80px -30px rgba(0, 0, 0, .5); font-family: var(--obs-font); }
.obs-modal__box h2 { font: 700 18px/1.35 var(--obs-display); color: var(--obs-navy); margin: 0 0 8px; letter-spacing: -.01em; }
.obs-modal__actions { display: flex; flex-wrap: wrap; justify-content: flex-end; gap: 10px; margin-top: 18px; }

@keyframes ostore-spin { to { transform: rotate(360deg); } }
@keyframes ostore-in { from { opacity: 0; transform: translateY(8px); } }
@keyframes ostore-fade { from { opacity: 0; } }
@keyframes ostore-flash { from { box-shadow: 0 0 0 3px var(--obs-gold); } }

/* ---------- Larger screens ---------- */
@media (min-width: 600px) {
	.ostore-lcard { padding: 20px 22px; }
	.ostore-lcard__meta { grid-template-columns: repeat(3, minmax(0, 1fr)); }
	.ostore-lcard__actions .ostore-inline-form { flex: 0 0 auto; }
	.ostore-lcard__actions .ostore-btn { width: auto; }
	.ostore-claim__row { flex-direction: row; }
	.ostore-claim__row .ostore-input { max-width: 360px; }
	.ostore-pricing { grid-template-columns: repeat(auto-fit, minmax(240px, 1fr)); }
	.obs-toasts { left: auto; right: 20px; bottom: 20px; }
}
@media (min-width: 900px) {
	.ostore-cards { grid-template-columns: repeat(auto-fill, minmax(340px, 1fr)); }
	.ostore-plan--featured { transform: translateY(-8px); }
	.ostore-plan--featured:hover { transform: translateY(-10px); }
}
@media (prefers-reduced-motion: reduce) {
	.obs-portal *, .obs-toast, .obs-modal { animation: none !important; transition: none !important; }
}
