/* The gift page (Website/Gift.cshtml), on top of home4.css: what the gift is on the left, and the form on
   the right, starting with a switch for 3, 5 or 7 years. */

.gift { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); gap: 56px; align-items: center; padding-block: 56px 96px; }
@media (max-width: 860px) { .gift { grid-template-columns: minmax(0, 1fr); gap: 36px; padding-block: 32px 72px; } }
.gift .copy { display: grid; gap: 16px; justify-items: start; min-width: 0; }
.gift h1 { font-size: clamp(2.4rem, 5vw, 3.4rem); font-weight: 600; letter-spacing: -.03em; }
.gift .lead { color: var(--muted); font-size: 1.1rem; max-width: 34rem; }
/* The headline's number, which drops in fresh when another length is picked */
.gift .num { display: inline-block; color: var(--accent); }
.gift .num.go { animation: drop .35s cubic-bezier(.2,.8,.25,1.2); }
@keyframes drop { from { transform: translateY(-.35em); opacity: 0; } to { transform: none; opacity: 1; } }

.gift-form { display: grid; gap: 14px; min-width: 0; padding: 24px; background: var(--surface); border: 1px solid var(--line); border-radius: 20px; box-shadow: var(--shadow); }
.gift-form .row { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); gap: 14px; }
@media (max-width: 520px) { .gift-form .row { grid-template-columns: minmax(0, 1fr); } .gift-form { padding: 20px 18px; } }

/* How long: a three-way switch, with the price beside the question */
.term { display: grid; gap: 8px; padding-bottom: 18px; margin-bottom: 4px; border-bottom: 1px solid var(--line); }
.term-head { display: flex; justify-content: space-between; align-items: baseline; gap: 10px; }
.term-head > :first-child { font-size: .82rem; font-weight: 600; }
.term-head > :last-child { font-size: .9rem; color: var(--muted); }
.seg { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 4px; padding: 4px; background: var(--bg); border: 1px solid var(--line); border-radius: 12px; }
.seg label { position: relative; display: block; padding: 10px 6px; border-radius: 9px; text-align: center; font-weight: 600; font-size: .95rem; color: var(--muted); cursor: pointer; transition: background-color .2s, color .2s, box-shadow .2s; }
.seg label:hover { color: var(--ink); }
/* The radio itself stays in the page, for the keyboard and screen readers */
.seg input { position: absolute; opacity: 0; width: 1px; height: 1px; pointer-events: none; }
.seg label:has(input:checked) { background: var(--surface); color: var(--ink); box-shadow: 0 1px 2px rgba(20,24,32,.12), 0 0 0 1px var(--line); }
.seg label:has(input:focus-visible) { outline: 2px solid var(--accent); outline-offset: 2px; }

.fld { display: grid; gap: 6px; min-width: 0; }
.fld > span { font-size: .82rem; font-weight: 600; }
.fld small { font-weight: 400; color: var(--muted); }
.fld input, .fld textarea { width: 100%; min-height: 44px; padding: 10px 12px; font: inherit; font-size: .95rem; color: var(--ink); background: var(--bg); border: 1px solid var(--line); border-radius: 10px; }
.fld textarea { min-height: 84px; resize: vertical; }
.fld input::placeholder, .fld textarea::placeholder { color: var(--muted); }
.fld :is(input, textarea):focus-visible { outline: 2px solid var(--accent); outline-offset: 0; border-color: transparent; border-radius: 10px; }

.gift-form .buy { gap: 8px; margin-top: 4px; padding-block: 13px; border: 0; font-family: var(--f-body); font-size: 1rem; cursor: pointer; }
.gift-form .buy svg { width: 18px; height: 18px; flex: none; fill: none; stroke: currentColor; stroke-width: 2; stroke-linecap: round; stroke-linejoin: round; }
.gift-form .fine { margin-top: 0; text-align: center; max-width: none; }

/* What to fix, from the server or the page's script; empty, it takes no room */
.gift-form .errors:empty, .gift-form .errors.validation-summary-valid { display: none; }
.gift-form .errors { padding: 10px 12px; border-radius: 10px; background: color-mix(in srgb, #d93025 10%, var(--surface)); color: #b3261e; font-size: .9rem; }
.gift-form .errors ul { margin: 0; padding-left: 18px; }
.gift-form .errors .notice { color: var(--ink); }
.gift-form .tome { display: flex; gap: 8px; align-items: center; font-size: .9rem; color: var(--muted); cursor: pointer; }

/* /premium/ (PremiumTerm/Term.cshtml) shares the gift page's layout. The full price, struck through beside
   the owner's; and "Bought Paprika 3?", which opens the sign-in for it. */
.term-head s { color: var(--muted); margin-right: 4px; }
.gift-form .owner { border-top: 1px solid var(--line); padding-top: 12px; }
.gift-form .owner summary { cursor: pointer; font-size: .9rem; color: var(--accent); font-weight: 600; list-style: none; }
.gift-form .owner summary::-webkit-details-marker { display: none; }
.gift-form .owner summary::after { content: " \203A"; }
.gift-form .owner[open] summary::after { content: ""; }
.gift-form .owner-fields { display: grid; gap: 12px; margin-top: 12px; }
.gift-form .owner-fields[hidden] { display: none; }
.gift-form .owner-done { margin: 10px 0 0; font-size: .9rem; color: var(--muted); }
.gift-form .secondary { justify-self: start; min-height: 40px; padding: 8px 16px; font: inherit; font-size: .95rem; font-weight: 600; color: var(--ink); background: var(--bg); border: 1px solid var(--line); border-radius: 10px; cursor: pointer; }
.gift-form .secondary:hover { border-color: var(--muted); }

/* /trial/ (Trial/Trial.cshtml, Trial/Start.cshtml) shares the layout too. Its checkout is FastSpring's, embedded
   in a box like the form's, which it takes the place of; a refusal's notice ends with Buy Premium instead. */
.gift-form[hidden], .trial-checkout[hidden] { display: none; }
.trial-checkout { min-width: 0; padding: 12px; background: var(--surface); border: 1px solid var(--line); border-radius: 20px; box-shadow: var(--shadow); }
.trial-checkout .fine { margin-top: 8px; text-align: center; max-width: none; }
.gift-form .errors.notice { color: var(--ink); }
.gift-form .errors.notice a { display: inline-block; margin-top: 10px; }
