/* ===== The keepsake order form, shared by Gifts for a grieving family
   (/gifts, gifts.html) and Pet keepsakes (/pet-keepsakes, pet-keepsakes.html,
   .gi-is-self). Moved from gifts.html's <style> unchanged. =====
   Mobile-first. Brand palette only; radii 8 / 16 / 100px / 50%;
   only transform + opacity animate. Shared m3 fields come from
   styles.css. Two paths in one form: buy now (Stripe Checkout, for
   the fixed-price keepsakes) and ask for a price (a quote request).
   Nothing here is fixed to the screen, so the app's tabs never cover
   it, and the form stays a normal part of the page in the apps. */
.gi-page { padding: 0; } /* undo the site-wide main { padding: 1rem } */
.gi-wrap { max-width: 760px; margin: 0 auto; }
.gi-wrap-wide { max-width: 1120px; margin: 0 auto; }

/* Hero */
.gi-hero { padding: 48px 0 32px; text-align: center; }
.gi-title { margin-bottom: 16px; letter-spacing: -0.03em; text-wrap: balance; }
.gi-hero-sub {
    max-width: 600px;
    margin: 0 auto;
    font-size: 16px;
    line-height: 26px;
    letter-spacing: -0.01em;
    color: #463351;
}
.gi-hero-alt { margin: 16px 0 0; font-size: 15px; line-height: 24px; color: #463351; }

/* Shared text links */
.gi-text-link,
.gi-card-make a,
.gi-send-note a,
.gi-send-error a,
.gi-success a {
    color: #1D4641;
    font-weight: 600;
    text-decoration: underline;
    text-decoration-thickness: 1px;
    text-underline-offset: 3px;
    border-radius: 8px;
}
.gi-text-link:hover, .gi-card-make a:hover, .gi-send-note a:hover,
.gi-send-error a:hover, .gi-success a:hover { color: #1D4641; text-decoration-thickness: 2px; }
.gi-text-link:focus-visible, .gi-card-make a:focus-visible, .gi-send-note a:focus-visible,
.gi-send-error a:focus-visible, .gi-success a:focus-visible { outline: 2px solid #1D4641; outline-offset: 2px; }
.gi-text-link:active, .gi-card-make a:active, .gi-send-note a:active,
.gi-send-error a:active, .gi-success a:active { opacity: 0.7; }
.gi-send-error a, .gi-success a { white-space: nowrap; }
.gi-nowrap { white-space: nowrap; }

/* Keepsakes you can send */
.gi-gifts { padding: 0 0 56px; }
.gi-section-title { margin: 0 0 8px; font-size: 26px; line-height: 32px; letter-spacing: -0.02em; color: #1D4641; text-wrap: balance; }
.gi-section-intro {
    max-width: 720px;
    margin: 0 0 8px;
    font-size: 16px;
    line-height: 26px;
    letter-spacing: -0.01em;
    color: #463351;
    text-wrap: pretty;
}
.gi-price-terms { max-width: 720px; margin: 0 0 24px; font-size: 14px; line-height: 22px; color: #463351; }
.gi-price-terms strong { font-weight: 600; color: #180026; }
.gi-cards { display: grid; grid-template-columns: 1fr; gap: 16px; margin: 0; padding: 0; list-style: none; }
.gi-card {
    display: flex;
    flex-direction: column;
    height: 100%;
    padding: 24px 16px;
    background: #FFFFFF;
    border: 1px solid #D4E9CA;
    border-radius: 16px;
    box-shadow: 0 1px 2px rgba(29, 70, 65, 0.04), 0 8px 24px rgba(29, 70, 65, 0.06);
}
.gi-card.is-picked { border-color: #1D4641; box-shadow: inset 0 0 0 1px #1D4641, 0 8px 24px rgba(29, 70, 65, 0.08); }
.gi-card-icon {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 48px;
    height: 48px;
    margin: 0 0 16px;
    border-radius: 50%;
    background: #D4E9CA;
    color: #1D4641;
    font-size: 22px;
    line-height: 1;
}
.gi-card-title { margin: 0 0 8px; font-size: 22px; line-height: 28px; letter-spacing: -0.02em; color: #1D4641; text-wrap: balance; }
.gi-card-price { margin: 0 0 8px; font-size: 15px; line-height: 24px; color: #180026; }
.gi-card-price strong { font-weight: 600; color: #1D4641; white-space: nowrap; }
.gi-card-desc { margin: 0 0 12px; font-size: 15px; line-height: 24px; color: #463351; }
.gi-card-delivery {
    display: flex;
    align-items: flex-start;
    gap: 8px;
    margin: 0 0 20px;
    font-size: 14px;
    line-height: 22px;
    color: #463351;
    text-wrap: pretty;
}
.gi-card-delivery i { color: #1D4641; font-size: 16px; line-height: 22px; }
.gi-card-foot { margin-top: auto; }

/* Buttons */
.gi-action {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    min-height: 48px;
    font-size: 16px;
    transition: transform 0.12s ease;
}
.gi-pick { width: 100%; }
.gi-page .gi-action:focus-visible { outline: 2px solid #1D4641; outline-offset: 2px; }
.gi-page .btn.gi-action:active { transform: scale(0.98); }
.gi-page .btn-secondary-dark2.gi-action:active {
    background-color: rgba(72, 112, 91, 0.22);
    border-color: #48705B;
    color: #48705B;
}
.gi-page .btn-primary-dark.gi-action:hover,
.gi-page .btn-primary-dark.gi-action:focus-visible,
.gi-page .btn-primary-dark.gi-action:active { background: #180026; border-color: #180026; }
.gi-page .btn-primary-dark.gi-action:disabled { opacity: 0.7; }

/* Gift form */
.gi-order { padding: 56px 0; background: #F1F4F4; scroll-margin-top: 80px; }
.gi-form-card {
    padding: 24px 16px;
    background: #FFFFFF;
    border: 1px solid #D4E9CA;
    border-radius: 16px;
    box-shadow: 0 1px 2px rgba(29, 70, 65, 0.06), 0 8px 24px rgba(29, 70, 65, 0.08);
}
.gi-form-title { margin: 0 0 8px; font-size: 26px; line-height: 32px; letter-spacing: -0.02em; color: #1D4641; text-wrap: balance; }
.gi-form-title:focus { outline: none; }
.gi-form-intro { margin: 0 0 24px; font-size: 16px; line-height: 26px; letter-spacing: -0.01em; color: #463351; text-wrap: pretty; }
/* /pet-keepsakes (.gi-is-self): a quiet way back to sending it as a gift. */
.gi-mode-switch { margin: -12px 0 24px; font-size: 15px; line-height: 24px; color: #463351; }
.gi-page .m3-hint { margin: 8px 0 0; padding-left: 16px; font-size: 13px; line-height: 18px; color: #463351; }
.gi-req { color: #1D4641; font-weight: 600; }
.gi-req-note { margin: 0 0 24px; font-size: 14px; line-height: 20px; color: #463351; }
.gi-subhead { margin: 8px 0 16px; font-size: 22px; font-weight: 600; line-height: 28px; letter-spacing: -0.02em; color: #1D4641; text-wrap: balance; }
.gi-field-foot { display: flex; flex-wrap: wrap; justify-content: space-between; align-items: baseline; gap: 0 16px; }
.gi-field-foot .m3-hint { flex: 1 1 220px; }
.gi-count { margin: 8px 0 0 auto; padding-right: 4px; font-size: 13px; line-height: 18px; text-align: right; color: #463351; white-space: nowrap; }
.gi-count.is-near { font-weight: 600; color: #180026; }

/* Choice groups (real radios) */
.gi-group { margin: 0 0 24px; padding: 0; border: 0; min-width: 0; }
.gi-legend {
    float: none;
    width: auto;
    margin: 0 0 4px;
    padding: 0;
    font-family: "Poppins", sans-serif;
    font-size: 16px;
    font-weight: 600;
    line-height: 24px;
    color: #180026;
}
.gi-legend-hint { margin: 0 0 12px; font-size: 14px; line-height: 20px; color: #463351; text-wrap: pretty; }
.gi-opts { display: grid; grid-template-columns: 1fr; gap: 8px; margin: 0; padding: 0; list-style: none; }
.gi-opt {
    display: flex;
    align-items: center;
    gap: 12px;
    min-height: 52px;
    height: 100%; /* tiles in one row of a two-column grid share its height */
    margin: 0;
    padding: 12px 16px;
    background: #FFFFFF;
    border: 1px solid #D4E9CA;
    border-radius: 8px;
    font-size: 15px;
    font-weight: 500;
    line-height: 22px;
    color: #180026;
    cursor: pointer;
}
.gi-opt:hover { border-color: #1D4641; }
.gi-opt:has(input:disabled) { cursor: not-allowed; background: #F1F4F4; border-color: #D4E9CA; color: #463351; }
.gi-radio:disabled { cursor: not-allowed; border-color: #463351; box-shadow: none; }
.gi-opt:has(input:checked) { border-color: #1D4641; box-shadow: inset 0 0 0 1px #1D4641; background: #F3F7FA; }
.gi-opt-text { display: block; min-width: 0; }
.gi-opt-sub { display: block; margin-top: 2px; font-size: 13px; font-weight: 400; line-height: 20px; color: #463351; text-wrap: pretty; }
.gi-radio {
    -webkit-appearance: none;
    appearance: none;
    position: relative;
    flex-shrink: 0;
    width: 24px;
    height: 24px;
    margin: 0;
    background: #FFFFFF;
    border: 2px solid #1D4641;
    border-radius: 50%;
    cursor: pointer;
    transition: transform 0.12s ease;
}
.gi-radio::after {
    content: "";
    position: absolute;
    top: 4px;
    left: 4px;
    width: 12px;
    height: 12px;
    border-radius: 50%;
    background: #1D4641;
    opacity: 0;
    transform: scale(0.4);
    transition: transform 0.15s ease, opacity 0.15s ease;
}
.gi-radio:checked::after { opacity: 1; transform: scale(1); }
.gi-radio:hover { box-shadow: 0 0 0 4px rgba(29, 70, 65, 0.12); }
.gi-radio:focus-visible { outline: 2px solid #1D4641; outline-offset: 3px; }
.gi-radio:active { transform: scale(0.92); }
.gi-picked { margin: 12px 0 0; font-size: 14px; line-height: 20px; font-weight: 500; color: #1D4641; }
.gi-picked:empty { margin: 0; }
/* The "choose a gift" error reuses the shared m3 error text style. */
.gi-group .m3-error-msg { margin-top: 8px; }
.gi-group.has-error .m3-error-msg { display: block; }

.gi-form-status { margin: 12px 0 0; font-size: 14px; line-height: 20px; color: #180026; }
.gi-form-status:empty { margin: 0; }
.gi-send-error {
    margin: 16px 0 0;
    padding: 16px;
    background: #F3F7FA;
    border: 1px solid #D4E9CA;
    border-radius: 8px;
    font-size: 15px;
    line-height: 24px;
    color: #180026;
}
.gi-send-note { margin: 16px 0 0; font-size: 14px; line-height: 22px; color: #463351; }
.gi-send { width: 100%; }

/* Sent */
.gi-success-icon {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 48px;
    height: 48px;
    margin: 0 0 16px;
    border-radius: 50%;
    background: #D4E9CA;
    color: #1D4641;
    font-size: 24px;
}
.gi-success-title { margin: 0 0 8px; font-size: 26px; line-height: 32px; letter-spacing: -0.02em; color: #1D4641; text-wrap: balance; }
.gi-success-title:focus { outline: none; }
.gi-success p { margin: 0 0 12px; font-size: 16px; line-height: 26px; color: #463351; }
.gi-success p:last-child { margin-bottom: 0; }

/* Other ways to help */
/* Other ways to help: the linen NBA grid (Figma 5653:161182, as on /keepsakes) */
.gi-more { padding: 56px 0; background: #FAF5EC; }
.gi-more-head { max-width: 680px; margin: 0 auto 48px; text-align: center; }
.gi-more-title { margin: 0 0 24px; letter-spacing: -0.018em; text-wrap: balance; }
.gi-more-sub { margin: 0; font-size: 16px; line-height: 24px; letter-spacing: -0.018em; color: #463351; }
.gi-nbas { display: grid; grid-template-columns: 1fr; gap: 24px; }
.gi-nba { display: flex; gap: 24px; padding: 24px; background: #FFFFFF; border: 1px solid #1D4641; border-radius: 24px; text-decoration: none; color: inherit; transition: transform 0.12s ease, box-shadow 0.15s ease; }
.gi-nba:hover { transform: translateY(-2px); box-shadow: 0 8px 24px rgba(29, 70, 65, 0.1); color: inherit; text-decoration: none; }
.gi-nba:focus-visible { outline: 2px solid #1D4641; outline-offset: 4px; }
.gi-nba:active { transform: scale(0.99); }
.gi-nba-img { flex-shrink: 0; width: 88px; height: 128px; object-fit: cover; border-radius: 8px; }
.gi-nba-body { flex: 1 1 auto; min-width: 0; display: flex; flex-direction: column; gap: 4px; }
.gi-nba-label { display: flex; align-items: flex-start; justify-content: space-between; gap: 8px; font-size: 14px; font-weight: 600; line-height: 20px; letter-spacing: -0.018em; color: #48705B; }
.gi-nba-arrow { flex: 0 0 auto; width: 16px; height: 12px; margin-top: 4px; background-color: #48705B; -webkit-mask: url("/assets/icons/ic_arrow_right.svg") no-repeat center / contain; mask: url("/assets/icons/ic_arrow_right.svg") no-repeat center / contain; transition: transform 0.15s ease; }
.gi-nba:hover .gi-nba-arrow { transform: translateX(3px); }
.gi-nba-desc { margin: 0; font-family: "Poppins", sans-serif; font-size: 18px; font-weight: 600; line-height: 26px; letter-spacing: -0.018em; color: #180026; }

/* ===== Buy now or ask for a price ===== */
/* On each card: how it's paid for, under the description. */
.gi-card-pay {
    display: flex;
    align-items: flex-start;
    gap: 8px;
    margin: 0 0 8px;
    font-size: 14px;
    line-height: 22px;
    color: #463351;
    text-wrap: pretty;
}
.gi-card-pay i { color: #1D4641; font-size: 16px; line-height: 22px; }
/* Tier tiles: a small pill says which ones are bought straight away. */
.gi-opt .gi-opt-text { flex: 1 1 auto; }
.gi-pill {
    flex-shrink: 0;
    padding: 2px 10px;
    border-radius: 100px;
    background: #D4E9CA;
    color: #1D4641;
    font-size: 12px;
    font-weight: 600;
    line-height: 20px;
    white-space: nowrap;
}
.gi-pill--quote { background: #F1F4F4; color: #463351; }
.gi-path {
    display: flex;
    align-items: flex-start;
    gap: 8px;
    margin: -8px 0 24px;
    padding: 12px 16px;
    background: #F3F7FA;
    border-radius: 8px;
    font-size: 14px;
    line-height: 22px;
    color: #180026;
    text-wrap: pretty;
}
.gi-path i { color: #1D4641; font-size: 16px; line-height: 22px; }
.gi-choose-hint { margin: 0; font-size: 14px; line-height: 22px; color: #463351; }
.gi-emailed-note { margin: 0 0 24px; font-size: 14px; line-height: 22px; color: #463351; }

/* Photos for the artist */
.gi-photos { margin: 0 0 24px; }
.gi-photo-list { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 12px; margin: 0 0 12px; padding: 0; list-style: none; }
.gi-photo-list:empty { display: none; }
.gi-photo {
    position: relative;
    aspect-ratio: 1 / 1;
    overflow: hidden;
    background: #F1F4F4;
    border: 1px solid #D4E9CA;
    border-radius: 8px;
}
.gi-photo img { display: block; width: 100%; height: 100%; object-fit: cover; }
.gi-photo.is-busy img { opacity: 0.55; }
.gi-photo-state {
    position: absolute;
    left: 6px;
    right: 6px;
    bottom: 10px;
    padding: 2px 6px;
    border-radius: 100px;
    background: rgba(255, 255, 255, 0.94);
    font-size: 12px;
    font-weight: 500;
    line-height: 18px;
    color: #180026;
    text-align: center;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}
.gi-photo-bar { position: absolute; left: 0; right: 0; bottom: 0; height: 4px; background: rgba(29, 70, 65, 0.16); }
.gi-photo-bar > span { display: block; height: 100%; background: #1D4641; transform: scaleX(0); transform-origin: left center; transition: transform 0.2s ease; }
.gi-photo-remove {
    position: absolute;
    top: 0;
    right: 0;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 44px;
    height: 44px;
    padding: 0;
    background: transparent;
    border: 0;
    border-radius: 50%;
    cursor: pointer;
}
.gi-photo-x {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 28px;
    height: 28px;
    border-radius: 50%;
    background: #FFFFFF;
    color: #1D4641;
    font-size: 14px;
    box-shadow: 0 1px 2px rgba(24, 0, 38, 0.12), 0 2px 8px rgba(29, 70, 65, 0.16);
    transition: transform 0.12s ease;
}
.gi-photo-remove:hover .gi-photo-x { background: #F3F7FA; color: #180026; }
.gi-photo-remove:focus-visible { outline: 2px solid #1D4641; outline-offset: -6px; }
.gi-photo-remove:active .gi-photo-x { transform: scale(0.9); }
.gi-photo-add { width: 100%; }
.gi-photo-status { margin: 8px 0 0; font-size: 14px; line-height: 20px; color: #463351; }
.gi-photo-status:empty, .gi-photos .m3-error-msg:empty { margin: 0; }
.gi-photos.has-error .m3-error-msg { display: block; }
.gi-file { position: absolute; width: 1px; height: 1px; opacity: 0; pointer-events: none; }

/* Their sky: the poster the print is made from */
.gi-sky { margin: 0 0 24px; }
.gi-sky-device { display: flex; flex-direction: column; align-items: stretch; gap: 8px; margin: 0 0 16px; }
.gi-sky-device-sub { font-size: 14px; line-height: 20px; color: #463351; }
.gi-or { margin: 0 0 16px; font-size: 14px; line-height: 20px; color: #463351; }
.gi-sky .m3-field { margin-bottom: 0; }
.gi-sky-card {
    display: flex;
    align-items: flex-start;
    gap: 12px;
    padding: 16px;
    background: #F3F7FA;
    border: 1px solid #D4E9CA;
    border-radius: 16px;
}
.gi-sky-icon {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
    width: 40px;
    height: 40px;
    border-radius: 50%;
    background: #1D4641;
    color: #D4E9CA;
    font-size: 18px;
}
.gi-sky-text { min-width: 0; }
.gi-sky-name { margin: 0; font-size: 16px; font-weight: 600; line-height: 24px; color: #180026; overflow-wrap: anywhere; }
.gi-sky-meta { margin: 2px 0 0; font-size: 14px; line-height: 22px; color: #463351; text-wrap: pretty; }
.gi-sky-actions { display: flex; flex-wrap: wrap; gap: 0 20px; }
.gi-sky-actions .gi-text-link { display: inline-block; padding: 11px 0; font-size: 14px; line-height: 22px; }
.gi-link-btn { padding: 11px 0; background: none; border: 0; cursor: pointer; }
.gi-link-btn:focus-visible { outline: 2px solid #1D4641; outline-offset: 2px; }
.gi-link-btn:active { opacity: 0.7; }
.gi-sky-make { margin: 8px 0 0; font-size: 14px; line-height: 22px; color: #463351; }

/* What you're buying, the button and what happens next */
.gi-buy-summary {
    display: flex;
    flex-wrap: wrap;
    justify-content: space-between;
    align-items: baseline;
    gap: 4px 16px;
    margin: 8px 0 16px;
    padding: 16px 0 0;
    border-top: 1px solid #D4E9CA;
}
.gi-buy-what { font-size: 16px; font-weight: 600; line-height: 24px; color: #180026; }
.gi-buy-price { font-size: 20px; font-weight: 600; line-height: 28px; color: #1D4641; white-space: nowrap; }
.gi-buy-sub { flex-basis: 100%; margin: 0; font-size: 14px; line-height: 20px; color: #463351; }
.gi-cancel-note {
    display: flex;
    align-items: flex-start;
    gap: 8px;
    margin: 0 0 16px;
    padding: 12px 16px;
    background: #F3F7FA;
    border: 1px solid #D4E9CA;
    border-radius: 8px;
    font-size: 15px;
    line-height: 24px;
    color: #180026;
}
.gi-cancel-note i { color: #1D4641; line-height: 24px; }
.gi-next {
    margin: 16px 0 0;
    padding: 16px;
    background: #F3F7FA;
    border-radius: 8px;
}
.gi-next-title { margin: 0 0 8px; font-size: 15px; font-weight: 600; line-height: 22px; color: #1D4641; }
.gi-next-list { margin: 0; padding: 0; list-style: none; }
.gi-next-list li { display: flex; align-items: flex-start; gap: 8px; font-size: 14px; line-height: 22px; color: #180026; }
.gi-next-list li + li { margin-top: 6px; }
.gi-next-list i { color: #1D4641; line-height: 22px; }
.gi-next-list a { color: #1D4641; font-weight: 600; text-decoration: underline; text-underline-offset: 3px; white-space: nowrap; border-radius: 8px; }
.gi-next-list a:hover { color: #1D4641; text-decoration-thickness: 2px; }
.gi-next-list a:focus-visible { outline: 2px solid #1D4641; outline-offset: 2px; }
.gi-next-list a:active { opacity: 0.7; }
.gi-success .gi-next { margin: 16px 0; }
.gi-success .gi-next-title { margin: 0 0 8px; font-size: 15px; font-weight: 600; line-height: 22px; color: #1D4641; }

@media (min-width: 576px) {
    .gi-photo-add { width: auto; }
    .gi-sky-device { flex-direction: row; flex-wrap: wrap; align-items: center; column-gap: 16px; }
    .gi-photo-list { grid-template-columns: repeat(3, 120px); }
}

@media (min-width: 576px) {
    /* 24px between columns, matching the form's .row gutter, so every
       two-column block shares the same column edges. */
    .gi-opts--two { grid-template-columns: 1fr 1fr; column-gap: 24px; }
    .gi-send { width: auto; min-width: 240px; }
}
@media (min-width: 768px) {
    .gi-cards { grid-template-columns: 1fr 1fr; }
    /* An odd last tile spans the row instead of leaving half of it empty. */
    .gi-card { padding: 28px 24px; }
    .gi-nbas { grid-template-columns: repeat(3, 1fr); }
}
@media (min-width: 992px) {
    .gi-hero { padding: 72px 0 40px; }
    .gi-hero-sub { font-size: 18px; line-height: 28px; }
    .gi-cards { grid-template-columns: 1fr 1fr 1fr; }
    /* /pet-keepsakes (.gi-is-self) shows the four pet keepsakes: two rows of two, no orphan. */
    .gi-page.gi-is-self .gi-cards { grid-template-columns: 1fr 1fr; }
    .gi-section-title, .gi-form-title, .gi-success-title { font-size: 32px; line-height: 40px; }
    .gi-form-card { padding: 32px; }
    .gi-order { padding: 72px 0; }
    .gi-more { padding: 72px 0; }
}
@media (prefers-reduced-motion: reduce) {
    .gi-radio, .gi-radio::after, .gi-action, .gi-nba, .gi-nba-arrow, .gi-photo-bar > span, .gi-photo-x { transition: none; }
}
