/* HikingEstonia gift cards — uses the theme's CSS variables (fallbacks for safety). */

/* ---- Buy form ---------------------------------------------------------- */
.hegc-form { margin: 8px 0 48px; }
.hegc-form-grid { display: grid; grid-template-columns: minmax(0, 1.15fr) minmax(0, 1fr); gap: 40px; align-items: start; }
.hegc-step { border: 0; margin: 0 0 28px; padding: 0; }
.hegc-step legend, .hegc-personal summary { font-family: var(--font-heading, sans-serif); font-size: 18px; font-weight: 600; color: var(--color-dark, #1d1d1d); margin-bottom: 12px; padding: 0; }
.hegc-personal summary { cursor: pointer; list-style: none; display: flex; align-items: center; gap: 8px; }
.hegc-personal summary::-webkit-details-marker { display: none; }
.hegc-personal summary::after { content: "+"; font-weight: 400; color: var(--color-primary, #57B957); font-size: 22px; line-height: 1; }
.hegc-personal[open] summary::after { content: "−"; }
.hegc-values { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 12px; }
.hegc-value { position: relative; cursor: pointer; }
.hegc-value input { position: absolute; opacity: 0; inset: 0; cursor: pointer; }
.hegc-value span { display: block; text-align: center; padding: 18px 8px; border: 2px solid var(--color-border, #dddee4); border-radius: var(--radius-sm, 4px); font-family: var(--font-heading, sans-serif); font-size: 20px; font-weight: 600; background: #fff; transition: border-color .2s, background .2s, color .2s; }
.hegc-value input:checked + span { border-color: var(--color-primary, #57B957); background: var(--color-mint-bg, #f1f9f1); color: var(--color-primary, #57B957); }
.hegc-value input:focus-visible + span { box-shadow: 0 0 0 3px rgba(87,185,87,.25); }
.hegc-check { display: flex; align-items: center; gap: 10px; font-weight: 600; cursor: pointer; }
.hegc-check input { width: 20px; height: 20px; accent-color: var(--color-primary, #57B957); }
.hegc-hint { font-size: 14px; color: var(--color-secondary, #898f9f); line-height: 1.55; margin: 6px 0 12px; }
.hegc-paper-hint { margin-left: 30px; }
.hegc-form:not(.is-paper) .hegc-paper-hint { display: none; }
.hegc-form.is-paper .hegc-email-only { display: none; }
.hegc-fields { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 14px 16px; margin-top: 4px; }
.hegc-fields .hegc-full { grid-column: 1 / -1; }
.hegc-email-only { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 14px 16px; }
.hegc-email-only .hegc-hint { grid-column: 1 / -1; margin: 0; }
.hegc-fields label { display: flex; flex-direction: column; gap: 6px; font-size: 14px; color: var(--color-body, #424541); }
.hegc-fields label > span { display: flex; justify-content: space-between; font-weight: 600; }
.hegc-count { font-weight: 400; color: var(--color-secondary, #898f9f); }
.hegc-fields input, .hegc-fields textarea { width: 100%; padding: 11px 12px; border: 1px solid var(--color-border, #dddee4); border-radius: var(--radius-sm, 4px); font: inherit; font-size: 15px; background: #fff; box-sizing: border-box; }
.hegc-fields input:focus, .hegc-fields textarea:focus { outline: none; border-color: var(--color-primary, #57B957); box-shadow: 0 0 0 3px rgba(87,185,87,.15); }
.hegc-buy { width: 100%; }

.hegc-preview { position: sticky; top: 120px; }
.hegc-preview-img { display: block; width: 100%; height: auto; border-radius: var(--radius, 12px); box-shadow: var(--shadow-card, 0 4px 16px rgba(0,0,0,.08)); background: #fff; }
.hegc-preview-note { margin-top: 16px; background: var(--color-mint-bg, #f1f9f1); border-left: 4px solid var(--color-primary, #57B957); border-radius: 6px; padding: 14px 18px; font-size: 15px; line-height: 1.5; }
.hegc-preview-note small { display: block; color: var(--color-secondary, #898f9f); font-size: 12px; }
.hegc-preview-message { font-style: italic; margin: 8px 0; white-space: pre-line; }
.hegc-preview-message:empty, .hegc-preview-to.is-empty, .hegc-preview-from.is-empty { display: none; }

/* ---- Balance check ---------------------------------------------------- */
.hegc-balance { margin: 8px 0 48px; padding: 28px; background: var(--color-light-gray, #f4f4f6); border-radius: var(--radius, 12px); }
.hegc-balance h2 { font-size: 20px; margin: 0 0 14px; }
.hegc-balance input { flex: 1 1 200px; padding: 12px; border: 1px solid var(--color-border, #dddee4); border-radius: var(--radius-sm, 4px); font-size: 15px; text-transform: uppercase; letter-spacing: .04em; }
.hegc-balance .btn-outline-green { padding: 12px 28px; }
.hegc-balance-result { margin: 14px 0 0; font-size: 15px; }
.hegc-balance-result.is-error { color: #b3261e; }

/* ---- Checkout box ----------------------------------------------------- */
.hegc-checkout { margin: 0 0 18px; padding: 16px 18px; border: 1px dashed var(--color-border, #dddee4); border-radius: var(--radius-sm, 4px); background: #fff; }
.hegc-checkout-label { display: block; font-weight: 600; margin-bottom: 8px; }
.hegc-checkout-row { display: flex; flex-wrap: wrap; gap: 8px; }
.hegc-checkout-row input { flex: 1 1 160px; min-width: 0; text-transform: uppercase; letter-spacing: .04em; }
.hegc-checkout .hegc-apply { flex: 0 0 auto; }
.hegc-checkout-msg { font-size: 14px; margin-top: 8px; }
.hegc-checkout-msg:empty { display: none; }
.hegc-checkout-msg.is-error { color: #b3261e; }
.hegc-checkout-msg.is-ok { color: var(--color-primary, #57B957); }
.hegc-applied { list-style: none; margin: 10px 0 0; padding: 0; font-size: 14px; }
.hegc-applied li { display: flex; justify-content: space-between; align-items: center; padding: 6px 0; border-top: 1px solid var(--color-light-gray, #f4f4f6); }
.hegc-applied span { font-family: Consolas, Menlo, monospace; font-weight: 600; }
.hegc-remove { background: none; border: 0; color: var(--color-secondary, #898f9f); text-decoration: underline; cursor: pointer; font-size: 13px; padding: 0; }
.hegc-remove:hover { color: #b3261e; }

@media (max-width: 900px) {
	.hegc-form-grid { grid-template-columns: 1fr; gap: 24px; }
	.hegc-preview { position: static; order: -1; }
}
@media (max-width: 560px) {
	.hegc-values { grid-template-columns: repeat(2, minmax(0, 1fr)); }
	.hegc-fields, .hegc-email-only { grid-template-columns: 1fr; }
	.hegc-paper-hint { margin-left: 0; }
}
