/* Scrap value estimate (price page and calculator). Same look as the price page. */

.scr-mp-add { flex: none; display: inline-flex; align-items: center; justify-content: center; width: 44px; height: 44px; min-height: 44px; padding: 0; border: 2px solid var(--scr-line-strong, #cfcbdb); border-radius: var(--scr-radius-sm, 8px); background: var(--scr-panel, #fff); color: var(--scr-ink, #17151f); font: inherit; font-size: 1.4em; font-weight: 600; line-height: 1; cursor: pointer; }
.scr-mp-add:hover { border-color: var(--scr-accent, #6528f7); }
.scr-mp-add:focus-visible { outline: 2px solid var(--scr-accent, #6528f7); outline-offset: 2px; }
.scr-mp-add.is-added { background: var(--scr-good, #13795b); border-color: var(--scr-good, #13795b); color: #fff; font-size: 1.15em; }
.scr-mp-row .scr-mp-right { display: flex; align-items: center; gap: 12px; }

.scr-est { margin: 48px 0 0; padding: 0; }
.scr-est:first-child { margin-top: 0; }
.scr-est-sub { margin: 4px 0 0; color: var(--scr-muted, #4d4a57); font-size: .9em; }
.scr-est-steps { display: flex; flex-wrap: nowrap; gap: 6px 16px; margin: 4px 0 10px; padding: 0; font-size: .9em; color: var(--scr-ink, #17151f); }
.scr-est-steps span { display: flex; align-items: center; gap: 6px; margin: 0; white-space: nowrap; }
.scr-est-steps b { flex: none; display: inline-flex; align-items: center; justify-content: center; width: 22px; height: 22px; border-radius: 50%; background: var(--scr-accent, #6528f7); color: var(--scr-accent-ink, #fff); font-size: .85em; }
.scr-est-item { border-bottom-color: var(--scr-line-strong, #cfcbdb) !important; }
.scr-mp-howto { display: flex; align-items: flex-start; gap: 10px; margin: 0 0 14px; padding: 14px 16px; border-radius: var(--scr-radius-sm, 10px); background: var(--scr-bg, #f1f2f4); color: var(--scr-ink, #17151f); font-size: .95em; line-height: 1.45; }
.scr-mp-howto-icon { flex: none; display: inline-flex; align-items: center; justify-content: center; width: 26px; height: 26px; border-radius: 50%; background: var(--scr-accent, #6528f7); color: var(--scr-accent-ink, #fff); font-weight: 800; }
.scr-mp .scr-mp-howto-link { color: var(--scr-accent-text, #4b1fc2); font-weight: 700; }
.scr-est-head { margin: 0 0 4px; }
.scr-est-unitwrap { display: flex; flex-direction: column; gap: 4px; }
/* Calculator: steps and kg / tonne on one line above the form; "Your estimate" under it. */
.scr-est-top { display: flex; flex-wrap: wrap; align-items: flex-end; justify-content: space-between; gap: 12px 16px; margin: 0 0 16px; }
.scr-est-top .scr-est-steps { flex-wrap: wrap; justify-content: flex-start !important; gap: 6px 12px; margin: 0; font-size: .85em; }
.scr-est-head.is-list { margin: 26px 0 4px; }
/* A metal in the list: a green tick (Core's success colour) by its name. */
.scr-est-name { display: grid; grid-template-columns: auto minmax(0, 1fr); column-gap: 8px; align-items: center; }
.scr-est-name::before { content: "✓"; grid-row: 1 / 3; display: flex; align-items: center; justify-content: center; width: 20px; height: 20px; border-radius: 50%; background: var(--scr-good, #13795b); color: #fff; font-size: 12px; font-weight: 800; line-height: 1; }

.scr-est-unitlabel { font-size: .9em; font-weight: 700; }
.scr-est-title { margin: 0; font-size: 1.3em; font-weight: 800; line-height: 1.2; }
.scr-est-units { display: flex; gap: 6px; }
.scr-est-units button { min-height: 36px; padding: 0 12px; border: 2px solid var(--scr-line-strong, #cfcbdb); border-radius: var(--scr-radius-sm, 10px); background: var(--scr-panel, #fff); color: var(--scr-ink, #17151f); font: inherit; font-size: .85em; font-weight: 600; cursor: pointer; }
.scr-est-units button[aria-selected="true"] { background: var(--scr-accent, #6528f7); border-color: var(--scr-accent, #6528f7); color: var(--scr-accent-ink, #fff); }
.scr-est-empty { margin: 12px 0; color: var(--scr-muted, #4d4a57); }
.scr-est-empty[hidden] { display: none; }

.scr-est .scr-est-list { list-style: none !important; margin: 0 !important; padding: 0 !important; }
.scr-est .scr-est-list > li { list-style: none !important; margin-left: 0 !important; padding-left: 0 !important; }
.scr-est .scr-est-list > li::marker { content: none; }
.scr-est-item { display: grid; grid-template-columns: minmax(0, 1fr) 150px 100px auto; gap: 10px; align-items: center; padding: 12px 0; border-bottom: 1px solid var(--scr-line, #e4e1ee); }
.scr-est-name { font-weight: 700; }
.scr-est-name small { display: block; font-weight: 400; color: var(--scr-muted, #4d4a57); font-size: .85em; }
.scr-est-weight { position: relative; display: block; margin: 0; }
.scr-est .scr-est-weight input { width: 100% !important; box-sizing: border-box !important; height: 44px !important; margin: 0 !important; padding: 0 58px 0 12px !important; border: 2px solid var(--scr-line-strong, #cfcbdb) !important; border-radius: var(--scr-radius-sm, 10px) !important; background: var(--scr-panel, #fff) !important; color: var(--scr-ink, #17151f) !important; font: inherit !important; font-size: 16px !important; text-align: right; box-shadow: none !important; }
.scr-est .scr-est-weight input:focus { outline: none !important; border-color: var(--scr-accent, #6528f7) !important; box-shadow: 0 0 0 3px var(--scr-accent-soft, #f4f0ff) !important; }
.scr-est-weight span { position: absolute; right: 12px; top: 50%; transform: translateY(-50%); color: var(--scr-muted, #4d4a57); font-size: .85em; pointer-events: none; }
.scr-est-line { text-align: right; font-size: 1.1em; font-weight: 800; font-variant-numeric: tabular-nums; }
.scr-est-remove { min-height: 36px; padding: 0 12px; border: 2px solid var(--scr-bad, #b42318); border-radius: var(--scr-radius-sm, 10px); background: var(--scr-bad, #b42318); color: #fff; font: inherit; font-size: .85em; font-weight: 600; cursor: pointer; }
.scr-est-remove:hover, .scr-est-remove:focus-visible { filter: brightness(.9); }

.scr-est-total { display: flex; align-items: baseline; justify-content: space-between; gap: 12px; padding: 16px 0 6px; }
.scr-est-total span { font-weight: 700; }
.scr-est-total strong { font-size: 1.9em; font-weight: 800; font-variant-numeric: tabular-nums; }
.scr-est-small { margin: 6px 0 14px; padding: 12px 0 0; border-top: 2px solid var(--scr-line-strong, #cfcbdb); background: none; color: var(--scr-muted, #4d4a57); font-size: .9em; line-height: 1.5; }
.scr-est-small strong { color: var(--scr-ink, #17151f); }
.scr-est-actions { display: flex; flex-wrap: wrap; gap: 8px; }
.scr-est-clear { min-height: 40px; padding: 0 14px; border: 2px solid var(--scr-line-strong, #cfcbdb); border-radius: var(--scr-radius-sm, 10px); background: var(--scr-panel, #fff); color: var(--scr-ink, #17151f); font: inherit; font-size: .9em; font-weight: 600; cursor: pointer; }

/* Total bar, stuck to the bottom while scrolling the prices. */
.scr-est-bar { position: fixed; z-index: 9990; left: 0; right: 0; bottom: 0; display: flex; align-items: center; gap: 12px; padding: 10px 16px; padding-bottom: max(10px, env(safe-area-inset-bottom)); background: var(--scr-ink, #17151f); color: var(--scr-panel, #fff); box-shadow: 0 -4px 18px rgba(0,0,0,.2); }
.scr-est-bar[hidden] { display: none; }
body.scr-est-has-bar { padding-bottom: 80px; }
.scr-est-bar > div { flex: none; }
.scr-est-bar-label { display: block; font-size: .78em; opacity: .8; }
.scr-est-bar-text { font-weight: 800; font-size: 1.05em; font-variant-numeric: tabular-nums; white-space: nowrap; }
.scr-est-bar button { flex: 1 1 auto; min-height: 48px; padding: 0 18px; border: 0; border-radius: var(--scr-radius-sm, 10px); background: var(--scr-accent, #6528f7); color: var(--scr-accent-ink, #fff); font: inherit; font-size: 1.05em; font-weight: 800; cursor: pointer; }
.scr-est-bar button:hover { background: var(--scr-accent-hover, #5420d4); }

/* Calculator: pick a metal (its price shows), type a weight (the total shows), Add. */
.scr-est-add { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)) auto; gap: 8px; align-items: end; margin: 0 0 14px; }
.scr-est-add .scr-est-f-metal { grid-column: 1 / -1; }
.scr-est-add label, .scr-est-add .scr-est-label { display: block; margin: 0 0 4px; font-weight: 700; font-size: .9em; }
.scr-est .scr-est-add input:not([readonly]):focus { outline: none !important; border-color: var(--scr-accent, #6528f7) !important; box-shadow: 0 0 0 3px var(--scr-accent-soft, #f4f0ff) !important; }
/* The metal box: looks like a dropdown, opens the full list. */
.scr-est .scr-est-pickbtn { position: relative; display: flex; align-items: center; width: 100%; height: 48px; margin: 0; padding: 0 40px 0 14px; border: 2px solid var(--scr-line-strong, #cfcbdb); border-radius: var(--scr-radius-sm, 10px); font: inherit; font-size: 16px; text-align: left; cursor: pointer; -webkit-tap-highlight-color: transparent; }
.scr-est .scr-est-pickbtn::after { content: ""; position: absolute; right: 16px; top: 50%; width: 8px; height: 8px; margin-top: -6px; border-right: 2px solid currentColor; border-bottom: 2px solid currentColor; transform: rotate(45deg); }
.scr-est-pickname { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.scr-est-pickbtn.is-empty .scr-est-pickname { color: var(--scr-muted, #4d4a57); }
/* The list of metals. */
.scr-est-picker .scr-mp-search { margin: 4px 0 8px; }
.scr-est-opts { padding: 0 0 16px; }
.scr-est-optgroup h4 { margin: 14px 0 6px; font-size: .8em; font-weight: 800; letter-spacing: .04em; text-transform: uppercase; color: var(--scr-muted, #4d4a57); }
.scr-est-optgroup[hidden], .scr-est-opt[hidden], .scr-est-nopick[hidden] { display: none !important; }
.scr-est .scr-est-opt, .scr-est-picker .scr-est-opt { display: flex; align-items: center; width: 100%; min-height: 50px; margin: 0 0 6px; padding: 0 14px; border: 2px solid var(--scr-line, #e4e1ee); border-radius: var(--scr-radius-sm, 10px); font: inherit; font-weight: 600; text-align: left; cursor: pointer; }
.scr-est-nopick { padding: 12px 2px; color: var(--scr-muted, #4d4a57); }
/* A metal already in the estimate: its weight under the name, a green tick on the right. */
.scr-est-optname { flex: 1 1 auto; min-width: 0; }
.scr-est-optin { display: block; margin-top: 1px; color: var(--scr-good, #13795b); font-size: .8em; font-weight: 600; }
.scr-est-optin[hidden] { display: none; }
.scr-est-opt.is-in::after { content: "✓"; flex: none; display: flex; align-items: center; justify-content: center; width: 22px; height: 22px; margin-left: 10px; border-radius: 50%; background: var(--scr-good, #13795b); color: #fff; font-size: 13px; font-weight: 800; line-height: 1; }
.scr-est-mine h4 { color: var(--scr-good, #13795b); }
.scr-est-already { margin: 6px 0 0; color: var(--scr-good, #13795b); font-size: .88em; font-weight: 600; }
.scr-est-already[hidden] { display: none; }
.scr-est .scr-est-add input { width: 100% !important; box-sizing: border-box !important; height: 48px !important; margin: 0 !important; padding: 0 12px !important; border: 2px solid var(--scr-line-strong, #cfcbdb) !important; border-radius: var(--scr-radius-sm, 10px) !important; background: var(--scr-panel, #fff) !important; color: var(--scr-ink, #17151f) !important; font: inherit !important; font-size: 16px !important; }
.scr-est .scr-est-add input[readonly] { background: var(--scr-line, #e4e1ee) !important; border-color: transparent !important; font-weight: 800 !important; font-variant-numeric: tabular-nums; cursor: default; }
.scr-est .scr-est-add input[readonly]:focus { box-shadow: none !important; outline: none !important; }
.scr-est-addbtn { -webkit-tap-highlight-color: transparent; min-height: 48px; padding: 0 22px; border: 2px solid var(--scr-good, #13795b); border-radius: var(--scr-radius-sm, 10px); background: var(--scr-good, #13795b); color: #fff; font: inherit; font-weight: 800; cursor: pointer; }

@media (max-width: 600px) {
	.scr-est { margin-top: 36px; }
	.scr-est:first-child { margin-top: 0; }
	.scr-est-steps { gap: 12px; font-size: .85em; justify-content: space-between; }
	.scr-est-item { grid-template-columns: minmax(0, 1fr) auto; grid-template-areas: "name line" "weight remove"; row-gap: 8px; }
	.scr-est-name { grid-area: name; }
	.scr-est-line { grid-area: line; }
	.scr-est-weight { grid-area: weight; max-width: 180px; }
	.scr-est-remove { grid-area: remove; justify-self: end; }
	.scr-est-add { grid-template-columns: 1fr 1fr; }
}
