/* List preferences extend the existing EuPagoMenos visual vocabulary. */
.list-view-switch { display: flex; gap: 4px; border-bottom: 1px solid var(--border); margin-bottom: 24px; }
.list-view-switch button { font: 600 .9rem var(--font); color: var(--text-secondary); background: none; border: 0; border-bottom: 2px solid transparent; padding: 14px 18px; min-height: 44px; cursor: pointer; }
.list-view-switch button.selected { color: var(--accent-text); border-bottom-color: var(--accent); }
.list-view-switch button:disabled { color: var(--text-muted); cursor: default; }
.saved-rule-row { display: flex; align-items: center; gap: 24px; padding: 22px 4px; border-bottom: 1px solid var(--border); }
.saved-rule-copy { flex: 1; min-width: 0; }
.saved-rule-copy h3 { font-size: 1rem; font-weight: 600; line-height: 1.5; overflow-wrap: anywhere; }
.list-rule-tags { display: flex; flex-wrap: wrap; align-items: center; gap: 10px; margin-top: 7px; font-size: .8rem; color: var(--text-secondary); }
.saved-rule-actions { display: flex; gap: 6px; flex-shrink: 0; }
.list-feedback-summary { margin-top: 8px; font-size: .8rem; color: var(--text-secondary); }
.list-attention { color: var(--yellow-text); font-size: .8rem; }
.list-reviewed { color: var(--green-text); font-size: .8rem; }
.list-field-label { display: block; font-size: .85rem; font-weight: 600; margin: 18px 0 8px; }
.list-rule-input { width: 100%; min-height: 48px; padding: 12px 14px; border: 1px solid var(--border); background: var(--bg-input); color: var(--text-primary); border-radius: var(--radius-sm); font: 1rem var(--font); }
.list-mode-options { border: 0; display: grid; grid-template-columns: 1fr 1fr; gap: 12px; margin: 20px 0; }
.list-mode-options legend { margin-bottom: 10px; font-size: .85rem; font-weight: 600; }
.list-mode-options label { display: flex; align-items: flex-start; gap: 12px; padding: 16px; border: 1px solid var(--border); border-radius: var(--radius-md); cursor: pointer; background: var(--bg-input); }
.list-mode-options label:has(input:checked) { border-color: var(--accent); background: var(--accent-glow); }
.list-mode-options input { margin-top: 5px; accent-color: var(--accent); flex-shrink: 0; width: 17px; height: 17px; }
.list-mode-options strong { font-size: .9rem; display: block; }
.list-mode-options small { display: block; color: var(--text-secondary); margin-top: 5px; line-height: 1.5; }
.list-guidance { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 20px 28px; }
.list-choice-field { border: 0; min-width: 0; padding: 0; margin: 0; }
.list-choice-field legend { font-size: .9rem; font-weight: 600; margin-bottom: 10px; }
.list-choice-field legend > span { display: block; margin-top: 4px; font-weight: 400; }
.list-choice-options { display: flex; flex-wrap: wrap; gap: 8px; }
.list-choice-chip { display: inline-flex; align-items: center; gap: 8px; min-height: 44px; padding: 10px 14px; border: 1px solid var(--border); border-radius: var(--radius-sm); background: var(--bg-input); cursor: pointer; font-size: .9rem; }
.list-choice-chip:has(input:checked) { background: var(--accent-glow); border-color: var(--accent); }
.list-choice-chip input { width: 16px; height: 16px; accent-color: var(--accent); margin: 0; }
.list-choice-field:disabled { opacity: .6; }
.list-choice-field:disabled .list-choice-chip { cursor: wait; }
.list-choice-optional, .list-guidance-note { color: var(--text-secondary); font-size: .8rem; line-height: 1.5; }
.list-guidance-note { grid-column: 1 / -1; margin: 0; text-wrap: pretty; }
.list-size-custom { margin-top: 8px; }
.list-size-custom summary { color: var(--accent-text); font-size: .85rem; cursor: pointer; padding: 10px 0; min-height: 40px; }
.list-size-fields { display: flex; flex-wrap: wrap; gap: 12px; align-items: flex-end; margin: 8px 0; }
.list-size-fields label { display: grid; gap: 6px; color: var(--text-secondary); font-size: .8rem; }
.list-size-fields input, .list-size-fields select { max-width: 160px; min-height: 44px; padding: 8px 10px; color: var(--text-primary); background: var(--bg-input); border: 1px solid var(--border); border-radius: var(--radius-sm); font: .9rem var(--font); }
.list-size-fields select:focus-visible { outline: 2px solid var(--accent-text); outline-offset: 3px; }
.list-rule-preview { padding: 14px 0; color: var(--text-secondary); font-size: .9rem; }
.list-rule-preview strong { color: var(--text-primary); }
.list-definition-needed { background: var(--yellow-bg); border-radius: var(--radius-sm); padding: 14px; }
.list-definition-needed strong { color: var(--yellow-text); }
.list-definition-needed p { margin: 5px 0; }
.list-definition-needed small { display: block; margin-top: 8px; }
.list-editor-actions { display: flex; justify-content: space-between; gap: 12px; flex-wrap: wrap; margin: 12px 0; }
.list-rule-feedback { color: var(--text-secondary); font-size: .85rem; margin-top: 12px; }
.list-rule-feedback summary, .purchase-item summary { cursor: pointer; min-height: 44px; display: flex; align-items: center; gap: 8px; }
.list-rule-feedback summary::before, .purchase-item summary::before { content: '+'; color: var(--accent-text); }
.list-rule-feedback details[open] > summary::before, .purchase-item details[open] > summary::before { content: '−'; }
.list-rule-feedback p { margin: 8px 0; }
.list-purchase-heading { display: flex; align-items: flex-start; justify-content: space-between; gap: 24px; margin: 24px 0; }
.list-purchase-heading h3 { font-size: 1.25rem; line-height: 1.4; }
.list-purchase-heading p { color: var(--text-secondary); max-width: 640px; font-size: .9rem; margin-top: 8px; text-wrap: pretty; }
.list-review-bar { display: flex; align-items: center; gap: 16px; flex-wrap: wrap; padding: 16px 20px; background: var(--bg-card); border: 1px solid var(--border); border-radius: var(--radius-md); margin-bottom: 16px; }
.list-review-bar strong { flex: 1; font-size: .95rem; }
.list-review-bar label { display: flex; gap: 8px; align-items: center; font-size: .8rem; min-height: 44px; cursor: pointer; }
.list-review-bar input { accent-color: var(--accent); }
.purchase-item { padding: 24px 0; border-bottom: 1px solid var(--border); }
.purchase-item-intent { display: flex; gap: 12px; align-items: center; flex-wrap: wrap; margin-bottom: 18px; }
.purchase-item-intent > strong { font-size: .95rem; overflow-wrap: anywhere; }
.purchase-offer { display: grid; grid-template-columns: 64px minmax(0, 1fr) auto 88px; gap: 18px; align-items: center; }
.purchase-offer img { width: 64px; height: 72px; object-fit: contain; background: #fff; border-radius: var(--radius-sm); padding: 5px; }
.purchase-offer-copy h4 { font-size: 1rem; font-weight: 600; line-height: 1.5; overflow-wrap: anywhere; }
.purchase-offer-copy p { color: var(--text-secondary); font-size: .85rem; margin: 3px 0; }
.purchase-price { text-align: right; }
.purchase-price strong { display: block; font-size: 1.1rem; font-variant-numeric: tabular-nums; }
.purchase-price span { color: var(--text-secondary); font-size: .75rem; }
.purchase-quantity { display: flex; flex-direction: column; gap: 5px; color: var(--text-secondary); font-size: .75rem; }
.purchase-quantity input { width: 88px; min-height: 44px; padding: 8px; color: var(--text-primary); font: 1rem var(--font); border: 1px solid var(--border); border-radius: var(--radius-sm); background: var(--bg-input); }
.purchase-item-actions { display: flex; gap: 12px; flex-wrap: wrap; align-items: flex-start; margin-top: 14px; }
.purchase-item-actions summary, .purchase-alternatives summary { color: var(--accent-text); font-size: .8rem; }
.purchase-feedback-actions { display: flex; gap: 6px; flex-wrap: wrap; }
.purchase-alternatives { margin-top: 6px; }
.purchase-alternative { display: flex; align-items: center; justify-content: space-between; gap: 18px; width: 100%; padding: 14px 16px; border: 1px solid var(--border); border-radius: var(--radius-sm); background: var(--bg-input); color: var(--text-primary); font: .85rem var(--font); text-align: left; cursor: pointer; margin-bottom: 8px; }
@media (hover: hover) { .purchase-alternative:hover { background: var(--bg-card-hover); border-color: var(--border-hover); } }
.purchase-alternative span { min-width: 0; overflow-wrap: anywhere; }
.purchase-alternative small { display: block; color: var(--text-secondary); margin-top: 5px; }
.purchase-alternative > strong { flex-shrink: 0; }
.purchase-skip { margin-top: 10px; color: var(--text-secondary); }
.purchase-unavailable { color: var(--text-secondary); font-size: .9rem; display: flex; gap: 14px; align-items: center; }
.purchase-skipped .purchase-offer, .purchase-skipped .purchase-unavailable { opacity: .55; }
.list-purchase-footer { display: flex; align-items: center; justify-content: space-between; gap: 28px; padding: 24px; margin-top: 24px; background: var(--bg-card); border: 1px solid var(--border); border-radius: var(--radius-md); }
.list-purchase-footer > div:first-child { max-width: 560px; }
.list-purchase-footer span { color: var(--text-secondary); font-size: .85rem; }
.list-purchase-footer strong { display: block; font-size: 1.75rem; margin: 4px 0; font-variant-numeric: tabular-nums; }
.list-purchase-footer small, .list-purchase-expiry { display: block; color: var(--text-secondary); font-size: .8rem; text-wrap: pretty; }
.list-purchase-footer p { font-size: .8rem; color: var(--text-secondary); margin-bottom: 10px; }
.list-purchase-expiry { margin-top: 12px; }
#tab-list-detail button:focus-visible, #tab-list-detail input:focus-visible, #tab-list-detail summary:focus-visible { outline: 2px solid var(--accent-text); outline-offset: 3px; }
#tab-list-detail button { min-height: 44px; }
#tab-list-detail button:disabled { opacity: .5; cursor: not-allowed; }
#pasteListModal { color: var(--text-primary); background: transparent; border: 0; padding: 0; margin: auto; width: min(600px, calc(100% - 24px)); max-height: 90dvh; overscroll-behavior: contain; }
#pasteListModal::backdrop { background: var(--bg-overlay); backdrop-filter: blur(8px); }
#pasteListModal .modal-card { width: 100%; max-width: none; margin: 0; }
#pasteListModal button:focus-visible, #pasteListModal textarea:focus-visible { outline: 2px solid var(--accent-text); outline-offset: 3px; }
@media (forced-colors: active) {
    #tab-list-detail :focus-visible, #pasteListModal :focus-visible { outline-color: Highlight; }
}
@media (max-width: 680px) {
    .saved-rule-row { align-items: flex-start; flex-direction: column; gap: 12px; padding: 20px 0; }
    .saved-rule-actions { width: 100%; justify-content: space-between; }
    .list-mode-options { grid-template-columns: 1fr; }
    .list-editor-actions > button { flex: 1 1 100%; }
    .list-purchase-heading { flex-direction: column; gap: 10px; }
    .list-review-bar { align-items: flex-start; gap: 8px; padding: 14px; }
    .list-review-bar strong { flex-basis: 100%; }
    .purchase-offer { grid-template-columns: 48px minmax(0, 1fr); gap: 12px; }
    .purchase-offer img { width: 48px; height: 58px; }
    .purchase-price { grid-column: 2; text-align: left; }
    .purchase-quantity { grid-column: 2; flex-direction: row; align-items: center; gap: 12px; }
    .purchase-item-actions { gap: 4px; }
    .purchase-feedback-actions { flex-direction: column; align-items: stretch; }
    .purchase-unavailable { align-items: flex-start; flex-direction: column; }
    .list-purchase-footer { flex-direction: column; align-items: stretch; padding: 18px; gap: 18px; }
    .list-purchase-footer .btn-primary { width: 100%; }
    .list-product-picker { padding: 16px; }
}
