/* Herbalson Partners (.com) — the herbalson.ru look; uses the theme tokens (--color-accent etc.) with fallbacks. */

.hp, .hp-bonus, .hp-modal, .hp-page {
	--hp-accent: var(--color-accent, #4a9a4a);
	--hp-accent-hover: var(--color-accent-hover, #3d8240);
	--hp-text: var(--color-text, #0a0a0a);
	--hp-muted: var(--color-text-light, #6b7280);
	--hp-border: var(--color-border, #e5e7eb);
	--hp-card: var(--color-bg-card, #f5f5f5);
	--hp-radius: var(--radius, 12px);
	--hp-radius-sm: var(--radius-sm, 8px);
}

.hp [hidden], .hp-page [hidden] { display: none !important; }

.hp { margin-top: 32px; display: grid; gap: 16px; }
.hp h3 { font-size: 1.125rem; font-weight: 700; margin: 0; }
.hp h4 { font-size: 0.9375rem; font-weight: 600; margin: 24px 0 12px; }
.hp p { margin: 0 0 12px; }
.hp-card { border: 1px solid var(--hp-border); border-radius: var(--hp-radius); padding: 24px; background: #fff; min-width: 0; }
.hp-head { display: flex; justify-content: space-between; align-items: baseline; gap: 12px; margin-bottom: 12px; flex-wrap: wrap; }
.hp-label { display: block; font-size: 0.8125rem; color: var(--hp-muted); margin-bottom: 6px; }
.hp-muted { color: var(--hp-muted); font-size: 0.875rem; }
.hp-small { font-size: 0.8125rem; }
.hp-link, .hp-small a { color: var(--hp-accent); font-size: 0.875rem; text-decoration: underline; text-underline-offset: 2px; }
.hp-notice { border: 1px solid var(--hp-border); border-left: 3px solid var(--hp-accent); border-radius: var(--hp-radius-sm); background: var(--hp-card); padding: 12px 16px; margin: 0 0 4px; font-size: 0.875rem; color: var(--hp-muted); }
.hp-error { color: #b42318; font-size: 0.8125rem; font-style: normal; }

/* Balance */
.hp-balance { display: flex; justify-content: space-between; gap: 24px; flex-wrap: wrap; background: var(--hp-card); border-color: transparent; }
.hp-balance-main { display: flex; flex-direction: column; gap: 4px; }
.hp-balance-sum { font-size: 2rem; font-weight: 800; line-height: 1.1; }
.hp-balance-side { display: flex; flex-direction: column; align-items: flex-end; gap: 8px; justify-content: center; }
.hp-chip { display: inline-block; padding: 6px 12px; border-radius: 100px; font-size: 0.8125rem; font-weight: 500; background: #fff; }
.hp-chip-pending { color: #8a5a00; background: #fff6e0; }
.hp-chip-warn { color: #b42318; background: #fdecea; }

/* Link */
.hp-share { display: flex; gap: 24px; align-items: flex-start; margin: 16px 0; }
.hp-share-main { flex: 1; min-width: 0; }
.hp-copy { display: flex; gap: 8px; }
.hp-copy input { flex: 1; min-width: 0; padding: 12px 14px; border: 1px solid var(--hp-border); border-radius: 100px; font-size: 0.875rem; background: #fff; }
.hp-copy .btn { padding: 12px 20px; }
.hp-code-row { display: flex; align-items: baseline; gap: 12px; margin-top: 14px; flex-wrap: wrap; }
.hp-code-row .hp-label { margin: 0; }
.hp-code { font-size: 1.125rem; letter-spacing: 0.04em; }
.hp-text-btn { background: none; border: 0; padding: 0; color: var(--hp-accent); font-size: 0.8125rem; cursor: pointer; text-decoration: underline; text-underline-offset: 2px; }
.hp-code-form { display: flex; gap: 8px; flex-wrap: wrap; margin-top: 10px; }
.hp-code-form input { padding: 10px 14px; border: 1px solid var(--hp-border); border-radius: 100px; text-transform: uppercase; width: 200px; }
.hp-code-form .btn { padding: 10px 18px; }
.hp-code-form p { flex-basis: 100%; margin: 0; }
.hp-share-buttons { display: flex; gap: 8px; margin-top: 16px; flex-wrap: wrap; }
.hp-share-btn { padding: 8px 16px; border: 1px solid var(--hp-border); border-radius: 100px; font-size: 0.8125rem; font-weight: 500; transition: border-color 0.2s; background: #fff; color: var(--hp-text); cursor: pointer; text-decoration: none; font-family: inherit; line-height: inherit; }
.hp-share-btn:hover { border-color: var(--hp-accent); }
.hp-qr { display: flex; flex-direction: column; align-items: center; gap: 6px; flex-shrink: 0; }
.hp-qr-img img { display: block; width: 140px; height: 140px; image-rendering: pixelated; border: 1px solid var(--hp-border); border-radius: var(--hp-radius-sm); }

/* Stats and tables */
.hp-stats { display: grid; grid-template-columns: repeat(4, 1fr); gap: 12px; margin-top: 16px; }
.hp-stats div { background: var(--hp-card); border-radius: var(--hp-radius-sm); padding: 14px 16px; display: flex; flex-direction: column; }
.hp-stats strong { font-size: 1.25rem; font-weight: 700; }
.hp-stats span { font-size: 0.8125rem; color: var(--hp-muted); }
.hp-table-wrap { overflow-x: auto; }
.hp-table { width: 100%; border-collapse: collapse; font-size: 0.875rem; }
.hp-table th { text-align: left; font-weight: 500; color: var(--hp-muted); font-size: 0.8125rem; padding: 8px 12px 8px 0; border-bottom: 1px solid var(--hp-border); white-space: nowrap; }
.hp-table td { padding: 10px 12px 10px 0; border-bottom: 1px solid var(--hp-border); vertical-align: top; }
.hp-table tr:last-child td { border-bottom: 0; }
.hp-plus { color: #245c24; white-space: nowrap; }
.hp-minus { white-space: nowrap; }
.hp-status { display: inline-block; font-size: 0.75rem; font-weight: 500; padding: 3px 10px; border-radius: 100px; background: var(--hp-card); white-space: nowrap; }
.hp-status-pending, .hp-status-progress { background: #fff6e0; color: #8a5a00; }
.hp-status-available { background: #ecf6ec; color: #245c24; }
.hp-status-cancelled { background: #fdecea; color: #b42318; }
.hp-history summary { cursor: pointer; font-weight: 600; }
.hp-history[open] summary { margin-bottom: 12px; }

/* Cart and checkout (order summary) */
.hp-bonus { border: 1px solid var(--hp-border); border-radius: var(--hp-radius); padding: 16px; margin: 12px 0; transition: opacity 0.2s; }
.hp-bonus.is-busy { opacity: 0.5; pointer-events: none; }
.hp-bonus-head { display: flex; justify-content: space-between; gap: 12px; margin-bottom: 10px; font-size: 0.9375rem; flex-wrap: wrap; }
.hp-bonus-head span { color: var(--hp-muted); font-size: 0.875rem; }
.hp-bonus-options { display: flex; gap: 8px; flex-wrap: wrap; }
.hp-bonus-btn { padding: 10px 16px; border: 1px solid var(--hp-border); border-radius: 100px; background: #fff; font-size: 0.875rem; font-weight: 500; cursor: pointer; color: var(--hp-text); font-family: inherit; }
.hp-bonus-btn.is-active { border-color: var(--hp-accent); background: var(--hp-accent); color: #fff; }
.hp-bonus-note { font-size: 0.8125rem; color: var(--hp-muted); margin: 10px 0 0; }
.hp-bonus-note-top { margin: 0 0 10px; }
.hp-bonus-custom { margin-top: 10px; font-size: 0.8125rem; }
.hp-bonus-custom summary { cursor: pointer; color: var(--hp-accent); }
.hp-bonus-custom div { display: flex; gap: 8px; margin-top: 8px; }
.hp-bonus-custom input { width: 120px; padding: 8px 12px; border: 1px solid var(--hp-border); border-radius: 100px; }
.hp-bonus .hp-error { margin: 10px 0 0; }

.hp-modal { position: fixed; inset: 0; background: rgba(10, 10, 10, 0.45); display: flex; align-items: center; justify-content: center; z-index: 100000; padding: 16px; }
.hp-modal-box { background: #fff; border-radius: var(--hp-radius); padding: 28px; max-width: 420px; width: 100%; position: relative; box-shadow: 0 20px 60px rgba(0, 0, 0, 0.2); }
.hp-modal-box h3 { font-size: 1.25rem; font-weight: 700; margin: 0 0 10px; }
.hp-modal-box p { margin: 0 0 20px; color: var(--hp-muted); }
.hp-modal-actions { display: flex; gap: 8px; flex-wrap: wrap; }
.hp-modal-close { position: absolute; top: 10px; right: 14px; background: none; border: 0; font-size: 1.5rem; cursor: pointer; color: var(--hp-muted); line-height: 1; }

/* Rules page */
.hp-page { padding: 60px 0; }
.hp-page .container { max-width: 880px; }
.hp-page h1 { font-size: 2.25rem; font-weight: 900; line-height: 1.15; margin: 0 0 16px; }
.hp-page h2 { font-size: 1.375rem; font-weight: 700; margin: 40px 0 14px; scroll-margin-top: 100px; }
.hp-page p, .hp-page li { font-size: 0.9375rem; line-height: 1.65; }
.hp-page p { margin: 0 0 12px; }
.hp-page ul { margin: 0 0 14px; padding-left: 22px; list-style: disc; }
.hp-page li { margin-bottom: 6px; }
.hp-page a { color: var(--hp-accent); text-decoration: underline; text-underline-offset: 2px; }
.hp-page .btn { text-decoration: none; }
.hp-page .btn-primary { color: #fff; }
.hp-lead { font-size: 1.125rem !important; color: var(--hp-muted); max-width: 640px; }
.hp-steps { display: grid; grid-template-columns: repeat(3, 1fr); gap: 16px; margin: 24px 0; }
.hp-step { background: var(--hp-card); border-radius: var(--hp-radius); padding: 20px; }
.hp-step b { display: block; font-size: 1.75rem; color: var(--hp-accent); margin-bottom: 6px; }
.hp-doc-meta { color: var(--hp-muted); font-size: 0.875rem !important; }

@media (max-width: 768px) {
	.hp-card { padding: 18px; }
	.hp-share { flex-direction: column; }
	.hp-qr { align-self: center; }
	.hp-stats { grid-template-columns: repeat(2, 1fr); }
	.hp-balance-side { align-items: flex-start; }
	.hp-copy { flex-direction: column; }
	.hp-steps { grid-template-columns: 1fr; }
	.hp-page { padding: 32px 0; }
	.hp-page h1 { font-size: 1.75rem; }
}
