/* Lot traceability dialog (layout) and open buttons on cards. */

.coffee-glyph {
    width: 1em;
    height: 1em;
    flex-shrink: 0;
    display: block;
    overflow: visible;
}

button.lot-sheet-open {
    appearance: none;
    background: none;
    border: 0;
    padding: 0;
    margin: 0;
    font: inherit;
    letter-spacing: inherit;
    text-transform: inherit;
    cursor: pointer;
    text-align: inherit;
}
button.lot-sheet-open.coffee-card-stock__green,
button.lot-sheet-open.lab-board__kg--green {
    color: #16A34A;
}
button.lot-sheet-open.coffee-card-stock__roast,
button.lot-sheet-open.lab-board__kg--roast {
    color: #8B5A2B;
}
html.dark button.lot-sheet-open.coffee-card-stock__green,
html.dark button.lot-sheet-open.lab-board__kg--green {
    color: #4ade80;
}
html.dark button.lot-sheet-open.coffee-card-stock__roast,
html.dark button.lot-sheet-open.lab-board__kg--roast {
    color: #c4a07a;
}
button.lot-sheet-open:hover,
button.lot-sheet-open:focus-visible {
    text-decoration: underline;
    text-underline-offset: 3px;
}
button.lot-sheet-open:focus-visible {
    outline: 2px solid #FF5A36;
    outline-offset: 2px;
}

.lot-sheet {
    width: min(26rem, calc(100vw - 2rem));
    max-height: min(36rem, calc(100vh - 2rem));
    padding: 0;
    border: 1px solid #111;
    background: #fff;
    color: #111;
    box-shadow: 0 24px 60px rgba(17, 17, 17, 0.22);
}
.lot-sheet::backdrop {
    background: rgba(17, 17, 17, 0.42);
}
.lot-sheet__card {
    position: relative;
    padding: 1.15rem 1.2rem 1.3rem;
}
.lot-sheet__close {
    position: absolute;
    top: 0.55rem;
    right: 0.55rem;
    width: 1.75rem;
    height: 1.75rem;
    border: 0;
    background: none;
    font-size: 1.35rem;
    line-height: 1;
    cursor: pointer;
    color: #111;
}
.lot-sheet__kicker {
    font-family: 'JetBrains Mono', monospace;
    font-size: 10px;
    font-weight: 700;
    letter-spacing: 0.2em;
    text-transform: uppercase;
    color: #FF5A36;
    margin: 0 0 0.45rem;
    display: inline-flex;
    align-items: center;
    gap: 0.35em;
    line-height: 1;
}
.lot-sheet__title {
    font-size: 1.15rem;
    letter-spacing: -0.03em;
    margin: 0 1.5rem 0.35rem 0;
    line-height: 1.2;
}
.lot-sheet__meta {
    margin: 0 0 1rem;
    font-size: 0.82rem;
    color: #4b5563;
    line-height: 1.4;
}
.lot-sheet__section {
    margin: 0 0 0.85rem;
    padding: 0.7rem 0.75rem;
    border: 1px solid #e5e7eb;
}
.lot-sheet__section.is-focus {
    border-color: #FF5A36;
}
.lot-sheet__section h3 {
    font-family: 'JetBrains Mono', monospace;
    font-size: 9px;
    font-weight: 700;
    letter-spacing: 0.18em;
    text-transform: uppercase;
    color: #8B8490;
    margin: 0 0 0.55rem;
}
.lot-sheet__steps {
    list-style: none;
    margin: 0 0 0.7rem;
    padding: 0;
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 0.45rem 0.7rem;
}
.lot-sheet__steps li {
    display: flex;
    flex-direction: column;
    gap: 0.12rem;
    min-width: 0;
}
.lot-sheet__steps span {
    font-family: 'JetBrains Mono', monospace;
    font-size: 8px;
    font-weight: 700;
    letter-spacing: 0.14em;
    color: #722EA8;
}
.lot-sheet__steps strong {
    font-family: 'Inter', sans-serif;
    font-size: 0.8rem;
    font-weight: 700;
    letter-spacing: -0.02em;
    line-height: 1.2;
}
.lot-sheet__note {
    margin: 0 0 0.7rem;
    font-size: 0.8rem;
    line-height: 1.45;
    color: #4b5563;
}
.lot-sheet__note[hidden] {
    display: none;
}
.lot-sheet__trail {
    display: grid;
    grid-template-columns: 1fr auto;
    gap: 0.35rem 0.85rem;
    margin: 0;
}
.lot-sheet__trail dt {
    font-family: 'JetBrains Mono', monospace;
    font-size: 10px;
    font-weight: 700;
    letter-spacing: 0.12em;
    text-transform: uppercase;
    color: #6b7280;
}
.lot-sheet__trail dd {
    margin: 0;
    text-align: right;
    font-family: 'JetBrains Mono', monospace;
    font-size: 11px;
    font-weight: 700;
}
.lot-sheet__section[hidden] {
    display: none;
}
.lot-sheet__roast-block + .lot-sheet__roast-block {
    margin-top: 0.85rem;
    padding-top: 0.75rem;
    border-top: 1px solid #e5e7eb;
}
html.dark .lot-sheet__roast-block + .lot-sheet__roast-block {
    border-top-color: #3A353C;
}
.lot-sheet__empty {
    margin: 0;
    font-size: 0.82rem;
    color: #6b7280;
}
.lot-sheet__roasts {
    display: flex;
    flex-direction: column;
    gap: 0.45rem;
}
.lot-sheet__roast {
    display: flex;
    justify-content: space-between;
    gap: 0.75rem;
    font-family: 'JetBrains Mono', monospace;
    font-size: 11px;
    font-weight: 700;
}
.lot-sheet__roast span:last-child {
    text-align: right;
    color: #8B5A2B;
}
html.dark .lot-sheet {
    background: #1C191F;
    color: #D6D0C8;
    border-color: #3A353C;
}
html.dark .lot-sheet__close,
html.dark .lot-sheet__title {
    color: #D6D0C8;
}
html.dark .lot-sheet__meta,
html.dark .lot-sheet__empty,
html.dark .lot-sheet__note {
    color: #a8a29a;
}
html.dark .lot-sheet__section {
    border-color: #3A353C;
}
html.dark .lot-sheet__section.is-focus {
    border-color: #FF5A36;
}
