/* Digital item sheet.
 *
 * The same full-screen editorial sheet as the ticket tier picker, for digital
 * items and memberships: slim bar, eyebrow, title, art, facts grid, what's
 * inside, license, and a dock with a square black action. The tokens and
 * rhythm are the ticket sheet's, renamed; its own id (`shop-digital-item`)
 * keeps the blanket "[id*=modal]" repaints and the button-safety sheet off.
 */
html body #shop-digital-item,
html body #shop-digital-item.is-menu-item {
    --dg-ink: #0d0f0e;
    --dg-body: #6f6f69;
    --dg-mute: #9a9a93;
    --dg-label: #8b8b85;
    --dg-hair: #e6e6e2;
    --dg-rule: #dcdcd6;
    --dg-paper: #ffffff;
    --dg-tint: #f6f7f5;
    --dg-accent: #3d7a56;
    --dg-accent: oklch(0.52 0.09 152);
    --dg-mono: ui-monospace, SFMono-Regular, Menlo, monospace;
    position: fixed;
    inset: 0;
    z-index: 10050;
    display: flex;
    flex-direction: column;
    background: var(--dg-paper) !important;
    color: var(--dg-ink) !important;
    font-family: "Helvetica Neue", Helvetica, Arial, sans-serif;
    -webkit-font-smoothing: antialiased;
}

html body #shop-digital-item .dg-scroll {
    flex: 1;
    overflow-y: auto;
    -webkit-overflow-scrolling: touch;
    padding-bottom: 36px;
}

/* Sticky bar */
html body #shop-digital-item .dg-bar {
    position: sticky;
    top: 0;
    z-index: 5;
    display: flex;
    align-items: center;
    gap: 12px;
    padding: calc(env(safe-area-inset-top, 0px) + 14px) 20px 12px;
    background: rgba(255, 255, 255, 0.92) !important;
    -webkit-backdrop-filter: blur(12px);
    backdrop-filter: blur(12px);
    border-bottom: 1px solid var(--dg-hair);
}

html body #shop-digital-item .dg-bar button {
    width: 26px;
    height: 26px;
    padding: 0;
    border: 0;
    background: transparent !important;
    box-shadow: none !important;
    color: var(--dg-ink) !important;
    -webkit-text-fill-color: var(--dg-ink) !important;
    font-size: 22px;
    line-height: 1;
    cursor: pointer;
}

html body #shop-digital-item .dg-bar span {
    font-family: var(--dg-mono);
    font-size: 10px;
    letter-spacing: 0.14em;
    color: var(--dg-label) !important;
    -webkit-text-fill-color: var(--dg-label) !important;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

/* Intro */
html body #shop-digital-item .dg-intro {
    padding: 34px 20px 0;
}

html body #shop-digital-item .dg-eyebrow {
    font-family: var(--dg-mono);
    font-size: 10.5px;
    letter-spacing: 0.16em;
    color: var(--dg-label) !important;
    -webkit-text-fill-color: var(--dg-label) !important;
}

html body #shop-digital-item .dg-intro h2 {
    margin: 14px 0 0;
    font-size: 34px;
    line-height: 1.04;
    letter-spacing: -0.025em;
    font-weight: 600;
    text-wrap: pretty;
    color: var(--dg-ink) !important;
    -webkit-text-fill-color: var(--dg-ink) !important;
}

html body #shop-digital-item .dg-intro p {
    margin: 14px 0 0;
    max-width: 32ch;
    font-size: 14px;
    line-height: 1.5;
    text-wrap: pretty;
    color: var(--dg-body) !important;
    -webkit-text-fill-color: var(--dg-body) !important;
}

/* Key art, 3:2, tap to view full */
html body #shop-digital-item .dg-art {
    display: block;
    width: calc(100% - 40px);
    margin: 30px 20px 0;
    aspect-ratio: 3 / 2;
    padding: 0;
    border: 0;
    border-radius: 0;
    background-color: #eeeeea !important;
    box-shadow: none !important;
    background-size: cover;
    background-position: center;
    cursor: pointer;
}

/* Facts grid: hairline-topped cells, two across */
html body #shop-digital-item .dg-facts {
    display: grid;
    grid-template-columns: 1fr 1fr;
    column-gap: 20px;
    row-gap: 1px;
    margin-top: 34px;
    padding: 0 20px;
    background: transparent !important;
    border: 0;
}

html body #shop-digital-item .dg-facts > div {
    border-top: 1px solid var(--dg-hair);
    padding: 14px 0 13px;
    background: transparent !important;
}

html body #shop-digital-item .dg-facts span {
    display: block;
    font-family: var(--dg-mono);
    font-size: 9.5px;
    letter-spacing: 0.14em;
    color: var(--dg-mute) !important;
    -webkit-text-fill-color: var(--dg-mute) !important;
}

html body #shop-digital-item .dg-facts strong {
    display: block;
    margin-top: 5px;
    font-size: 15px;
    font-weight: 400;
    letter-spacing: -0.01em;
    color: var(--dg-ink) !important;
    -webkit-text-fill-color: var(--dg-ink) !important;
}

/* Pickup location: a fact like the rest, but the address is long enough to
   need the full row, and the owner can tap the value to correct it -- a
   Google listing's address is a starting point, not always where pickup
   actually happens. */
html body #shop-digital-item .dg-facts > div.is-pickup {
    grid-column: 1 / -1;
}

html body #shop-digital-item .dg-facts [data-pickup-value] {
    outline: none;
    cursor: text;
}

html body #shop-digital-item .dg-facts [data-pickup-value]:empty::before {
    content: attr(data-placeholder);
    color: var(--dg-mute) !important;
    -webkit-text-fill-color: var(--dg-mute) !important;
}

html body #shop-digital-item .mobile-shop-pickup-edit-hint {
    margin-top: 4px;
    font-family: var(--dg-mono);
    font-size: 9px;
    letter-spacing: 0.1em;
    color: var(--dg-mute) !important;
    -webkit-text-fill-color: var(--dg-mute) !important;
}

/* Section head */
html body #shop-digital-item .dg-choose {
    display: flex;
    align-items: baseline;
    justify-content: space-between;
    margin-top: 40px;
    padding: 0 20px 10px;
    font-family: var(--dg-mono);
    font-size: 10.5px;
    letter-spacing: 0.16em;
}

html body #shop-digital-item .dg-choose span:first-child {
    color: var(--dg-ink) !important;
    -webkit-text-fill-color: var(--dg-ink) !important;
}

html body #shop-digital-item .dg-choose span:last-child {
    letter-spacing: 0.12em;
    color: var(--dg-mute) !important;
    -webkit-text-fill-color: var(--dg-mute) !important;
}

/* Fine print */
html body #shop-digital-item .dg-fine {
    margin-top: 0;
    padding: 26px 20px 0;
    border-top: 1px solid var(--dg-hair);
    font-family: var(--dg-mono);
    font-size: 10px;
    letter-spacing: 0.12em;
    line-height: 1.7;
    color: var(--dg-mute) !important;
    -webkit-text-fill-color: var(--dg-mute) !important;
}

/* Dock */
html body #shop-digital-item .dg-dock {
    padding: 16px 20px calc(20px + env(safe-area-inset-bottom, 0px));
    background: rgba(255, 255, 255, 0.94) !important;
    -webkit-backdrop-filter: blur(14px);
    backdrop-filter: blur(14px);
    border-top: 1px solid var(--dg-rule);
    box-shadow: none;
}

html body #shop-digital-item .dg-dock-line {
    display: flex;
    align-items: baseline;
    justify-content: space-between;
    padding: 0;
}

html body #shop-digital-item .dg-dock-line span {
    font-family: var(--dg-mono);
    font-size: 10.5px;
    letter-spacing: 0.12em;
    color: var(--dg-label) !important;
    -webkit-text-fill-color: var(--dg-label) !important;
}

html body #shop-digital-item .dg-dock-line strong {
    font-size: 22px;
    font-weight: 600;
    letter-spacing: -0.02em;
    font-variant-numeric: tabular-nums;
    color: var(--dg-ink) !important;
    -webkit-text-fill-color: var(--dg-ink) !important;
}

html body #shop-digital-item .dg-dock-fee {
    margin-top: 6px;
    font-family: var(--dg-mono);
    font-size: 9.5px;
    letter-spacing: 0.1em;
    color: var(--dg-mute) !important;
    -webkit-text-fill-color: var(--dg-mute) !important;
}

html body #shop-digital-item .dg-cta {
    margin-top: 16px;
    width: 100%;
    height: 52px;
    padding: 0;
    border: 0;
    border-radius: 0;
    background: var(--dg-ink) !important;
    box-shadow: none !important;
    color: var(--dg-paper) !important;
    -webkit-text-fill-color: var(--dg-paper) !important;
    font-family: var(--dg-mono);
    font-size: 11px;
    letter-spacing: 0.16em;
    cursor: pointer;
    transition: background 140ms ease;
}

html body #shop-digital-item .dg-cta:disabled {
    background: var(--dg-rule) !important;
    color: var(--dg-mute) !important;
    -webkit-text-fill-color: var(--dg-mute) !important;
    cursor: not-allowed;
}

html body #shop-digital-item .dg-cta.is-added {
    background: var(--dg-accent) !important;
    color: var(--dg-paper) !important;
    -webkit-text-fill-color: var(--dg-paper) !important;
}


/* Share button in the bar */
html body #shop-digital-item .dg-bar button[data-share] {
    width: 26px;
    height: 26px;
    padding: 0;
    border: 0;
    background: transparent !important;
    box-shadow: none !important;
    color: var(--dg-ink) !important;
    -webkit-text-fill-color: var(--dg-ink) !important;
    font-size: 16px;
    line-height: 1;
    cursor: pointer;
}

html body #shop-digital-item .dg-bar {
    justify-content: space-between;
}

html body #shop-digital-item .dg-bar-lead {
    display: flex;
    align-items: center;
    gap: 12px;
    min-width: 0;
}

/* Art: 4:3 like the Digital Item sheet; a video plays in place */
html body #shop-digital-item .dg-art {
    aspect-ratio: 4 / 3;
}

html body #shop-digital-item .dg-art.is-video {
    cursor: default;
}

html body #shop-digital-item .dg-art video {
    display: block;
    width: 100%;
    height: 100%;
    object-fit: cover;
}

/* What's inside */
html body #shop-digital-item .dg-list {
    padding: 0 20px;
}

html body #shop-digital-item .dg-row {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 12px 0;
    border-top: 1px solid var(--dg-hair);
}

html body #shop-digital-item .dg-ext {
    flex: 0 0 30px;
    width: 30px;
    height: 30px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: #f2f2f0 !important;
    font-family: var(--dg-mono);
    font-size: 8.5px;
    font-weight: 600;
    letter-spacing: 0.04em;
    color: var(--dg-body) !important;
    -webkit-text-fill-color: var(--dg-body) !important;
}

html body #shop-digital-item .dg-row-name {
    flex: 1;
    min-width: 0;
    font-size: 14px;
    font-weight: 500;
    letter-spacing: -0.01em;
    overflow-wrap: anywhere;
    color: var(--dg-ink) !important;
    -webkit-text-fill-color: var(--dg-ink) !important;
}

html body #shop-digital-item .dg-row-size {
    flex: 0 0 auto;
    font-family: var(--dg-mono);
    font-size: 9.5px;
    color: var(--dg-mute) !important;
    -webkit-text-fill-color: var(--dg-mute) !important;
}

/* License */
html body #shop-digital-item .dg-license {
    display: flex;
    flex-direction: column;
    gap: 8px;
    padding: 0 20px;
}

html body #shop-digital-item .dg-license-line {
    display: flex;
    align-items: flex-start;
    gap: 9px;
    font-size: 12.5px;
    line-height: 1.45;
    color: var(--dg-body) !important;
    -webkit-text-fill-color: var(--dg-body) !important;
}

html body #shop-digital-item .dg-license-line > span:last-child {
    color: var(--dg-body) !important;
    -webkit-text-fill-color: var(--dg-body) !important;
}

html body #shop-digital-item .dg-dot {
    flex: 0 0 5px;
    width: 5px;
    height: 5px;
    margin-top: 7px;
    border-radius: 50%;
    background: #18a957 !important;
}

html body #shop-digital-item .dg-license-line.is-restricted .dg-dot {
    background: #c8102e !important;
}

/* Owner dock */
html body #shop-digital-item .dg-owner {
    display: flex;
    gap: 10px;
    margin-top: 16px;
}

html body #shop-digital-item .dg-owner .dg-cta {
    margin-top: 0;
    flex: 1;
}

html body #shop-digital-item .dg-cta.is-secondary {
    border: 1px solid var(--dg-rule);
    background: var(--dg-paper) !important;
    color: var(--dg-ink) !important;
    -webkit-text-fill-color: var(--dg-ink) !important;
}
