/* Gift cards (roadmap item 6.1), loaded only on the gift card page. */

.hebe-gift { padding-bottom: 70px; }

.hebe-gift__head { padding: 10px 0 24px; }
.hebe-gift__head h1 { font-size: clamp(1.9rem, 4vw, 2.8rem); font-weight: 400; }
.hebe-gift__head p { max-width: 62ch; margin-top: 10px; color: var(--hebe-ink-soft); }

.hebe-gift__alert { margin-bottom: 18px; padding: 12px 16px; border-radius: 12px; background-color: color-mix(in srgb, var(--hebe-rose) 22%, var(--hebe-card)); font-weight: 700; }

.hebe-gift__form { display: grid; grid-template-columns: minmax(0, 1.4fr) minmax(0, 1fr); gap: 40px; align-items: start; }
.hebe-gift__fields { display: grid; gap: 28px; min-width: 0; }

.hebe-gift__part { display: grid; gap: 10px; min-width: 0; margin: 0; padding: 0 0 26px; border: 0; border-bottom: var(--hebe-stitch); }
.hebe-gift__part legend,
.hebe-gift__part h2 { float: left; width: 100%; margin-bottom: 4px; padding: 0; font: 400 1.6rem/1.2 var(--hebe-display); }
.hebe-gift__part > p { clear: both; color: var(--hebe-ink-soft); }

.hebe-gift__picks { display: flex; flex-wrap: wrap; gap: 10px; clear: both; }
.hebe-gift__picks label { position: relative; }
.hebe-gift__picks input { position: absolute; inset: 0; opacity: 0; cursor: pointer; }
.hebe-gift__picks span { display: block; padding: 9px 18px; border: var(--hebe-stitch); border-radius: 999px; font-weight: 600; cursor: pointer; }
.hebe-gift__picks input:checked + span { border: 2px solid var(--hebe-ink); background-color: var(--hebe-ink); color: var(--hebe-card); }
.hebe-gift__picks input:focus-visible + span { outline: 3px solid var(--hebe-teal); outline-offset: 3px; }

.hebe-gift__custom { max-width: 320px; margin-top: 6px; }

.hebe-gift__designs { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 12px; clear: both; margin-top: 6px; }
.hebe-gift__designs label { position: relative; display: block; cursor: pointer; }
.hebe-gift__designs input { position: absolute; inset: 0; width: 100%; height: 100%; margin: 0; opacity: 0; cursor: pointer; }
.hebe-gift__tile { display: grid; place-items: center; aspect-ratio: 16 / 10; border-radius: 10px; background-color: color-mix(in srgb, var(--tone) 30%, var(--hebe-card)); color: var(--tone); }
.hebe-gift__tile svg { width: 34%; }
.hebe-gift__tile-name { display: block; margin-top: 8px; font-size: 0.95rem; font-weight: 600; text-align: center; }
.hebe-gift__designs input:checked + .hebe-gift__tile { outline: 2px solid var(--hebe-ink); outline-offset: 3px; }
.hebe-gift__designs input:focus-visible + .hebe-gift__tile { outline: 3px solid var(--hebe-teal); outline-offset: 3px; }

.hebe-gift__part .hebe-fields { clear: both; }

.hebe-gift__sum { display: grid; gap: 8px; clear: both; margin: 4px 0 0; }
.hebe-gift__sum div { display: flex; flex-wrap: wrap; justify-content: space-between; gap: 4px 16px; }
.hebe-gift__sum dt { color: var(--hebe-ink-soft); }
.hebe-gift__sum dd { margin: 0; font-weight: 700; overflow-wrap: anywhere; }
.hebe-gift__submit { display: flex; flex-wrap: wrap; align-items: center; gap: 12px 16px; margin-top: 12px; }
.hebe-gift__submit span { color: var(--hebe-ink-soft); font-size: 0.92rem; }

.hebe-gift__aside { position: sticky; top: 110px; display: grid; gap: 14px; }

.hebe-gift__card {
    position: relative;
    aspect-ratio: 16 / 10;
    padding: 12px;
    border-radius: 16px;
    background-color: color-mix(in srgb, var(--tone, var(--hebe-rose)) 30%, var(--hebe-card));
    box-shadow: 0 18px 40px -24px color-mix(in srgb, var(--hebe-ink) 60%, transparent);
    transition: background-color 0.3s ease;
    container-type: inline-size;
}

.hebe-gift__card-in { position: relative; display: flex; flex-direction: column; height: 100%; padding: 5cqw 6cqw; border: var(--hebe-stitch); border-radius: 10px; overflow: hidden; }
.hebe-gift__card p { margin: 0; }
.hebe-gift__brand { font: 600 4.2cqw/1 var(--hebe-display); }
.hebe-gift__code { position: absolute; top: 5cqw; right: 6cqw; color: var(--hebe-ink-soft); font: 3.4cqw var(--hebe-hand); }
.hebe-gift__kind { margin-top: 2cqw !important; color: var(--hebe-ink-soft); font: 4.4cqw var(--hebe-hand); }
.hebe-gift__amount { margin-top: 1cqw !important; font: 500 10.5cqw/1 var(--hebe-display); }
.hebe-gift__to { max-width: 62%; margin-top: auto !important; overflow: hidden; font-size: 3.8cqw; font-weight: 700; text-overflow: ellipsis; white-space: nowrap; }
.hebe-gift__msg { display: -webkit-box; max-width: 62%; margin-top: 1cqw !important; overflow: hidden; font: 4.2cqw/1.25 var(--hebe-hand); -webkit-line-clamp: 2; -webkit-box-orient: vertical; }
.hebe-gift__from { max-width: 62%; margin-top: 1cqw !important; overflow: hidden; color: var(--hebe-ink-soft); font-size: 3.4cqw; text-overflow: ellipsis; white-space: nowrap; }
.hebe-gift__art { position: absolute; right: 5cqw; bottom: 5cqw; width: 21cqw; color: var(--tone, var(--hebe-rose)); }
.hebe-gift__art svg { display: block; width: 100%; }
.hebe-gift__when { color: var(--hebe-ink-soft); font-family: var(--hebe-hand); font-size: 1.1rem; }

.hebe-gift__how { margin-top: 50px; padding: 34px; border-radius: 20px; background-color: var(--hebe-card); }
.hebe-gift__how h2,
.hebe-gift__terms h2 { font-size: 1.6rem; }
.hebe-gift__steps { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 20px; margin: 18px 0 0; padding: 0; counter-reset: step; list-style: none; }
.hebe-gift__steps li { display: grid; gap: 6px; counter-increment: step; }
.hebe-gift__steps li::before { content: counter(step); color: var(--hebe-rose); font: 500 1.8rem/1 var(--hebe-display); }
.hebe-gift__steps h3 { font-size: 1.1rem; }
.hebe-gift__steps p { color: var(--hebe-ink-soft); }

.hebe-gift__terms { display: grid; grid-template-columns: minmax(0, 1.2fr) minmax(0, 1fr); gap: 32px; align-items: start; margin-top: 40px; }
.hebe-gift__terms ul { display: grid; gap: 8px; margin: 14px 0 0; padding-left: 20px; color: var(--hebe-ink-soft); }
.hebe-gift__balance { padding: 24px; border: var(--hebe-stitch); border-radius: 18px; }
.hebe-gift__balance > p { margin-top: 6px; color: var(--hebe-ink-soft); }
.hebe-gift__balance form { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 14px; }
.hebe-gift__balance input { flex: 1 1 180px; min-width: 0; }
.hebe-gift__result { display: grid; gap: 4px; margin-top: 16px; padding-top: 16px; border-top: var(--hebe-stitch); }
.hebe-gift__result strong { font: 500 1.7rem/1.2 var(--hebe-display); }

@media (max-width: 900px) {
    .hebe-gift__form,
    .hebe-gift__terms,
    .hebe-gift__steps { grid-template-columns: minmax(0, 1fr); }

    .hebe-gift__aside { position: static; order: -1; }
}

@media (max-width: 560px) {
    .hebe-gift__designs { gap: 8px; }
    .hebe-gift__tile-name { font-size: 0.88rem; }
    .hebe-gift__how { padding: 22px; }
}

@media (prefers-reduced-motion: reduce) {
    .hebe-gift__card { transition: none; }
}

/* Buying a pattern or a course for someone else, and claiming it (roadmap item 6.1). */
.hebe-gift__item { display: flex; gap: 16px; align-items: center; clear: both; }
.hebe-gift__item img { width: 96px; height: 96px; border-radius: 14px; object-fit: cover; }
.hebe-gift__item p { margin: 0; }
.hebe-gift__item-kind { color: var(--hebe-ink-soft); font-family: var(--hebe-hand); }
.hebe-gift__item-name { font: 500 1.3rem/1.25 var(--hebe-display); }
.hebe-gift__item-price { font-weight: 700; }

.hebe-gift__explain { padding: 24px; border-radius: 18px; background-color: var(--hebe-card); }
.hebe-gift__explain h2 { font-size: 1.4rem; }
.hebe-gift__explain ol { display: grid; gap: 14px; margin: 0; padding-left: 20px; }
.hebe-gift__explain li { display: grid; gap: 4px; }
.hebe-gift__explain li span { color: var(--hebe-ink-soft); }
.hebe-gift__note { padding: 12px 14px; border-radius: 12px; background-color: color-mix(in srgb, var(--hebe-mustard) 18%, var(--hebe-card)); color: var(--hebe-ink-soft); }

.hebe-gift__claim { display: grid; gap: 18px; justify-items: start; max-width: 640px; margin: 30px auto 0; padding: 34px; border-radius: 22px; background-color: var(--hebe-card); }
.hebe-gift__claim h1 { font-size: clamp(1.7rem, 4vw, 2.4rem); font-weight: 400; }
.hebe-gift__message { padding: 14px 18px; border-left: 3px solid var(--hebe-rose); font: 1.25rem/1.4 var(--hebe-hand); }
.hebe-gift__done { padding: 12px 16px; border-radius: 12px; background-color: color-mix(in srgb, var(--hebe-moss) 24%, var(--hebe-card)); font-weight: 700; }

@media (max-width: 560px) {
    .hebe-gift__claim { padding: 22px; }
}

@media (max-width: 900px) {
    .hebe-gift__aside.hebe-gift__explain { order: 1; }
}
