/* "Uploadaj i naruči PDF" configurator — matches shop.css tokens. Mobile-first. */

.updtf { margin-top: 6px; }
.updtf-intro { color: var(--sh-muted); margin: 0 0 16px; }

/* ---- file rows ---- */
.updtf-rows { display: flex; flex-direction: column; gap: 10px; margin: 0 0 10px; }
.updtf-row {
    border: 1px solid var(--sh-line); border-radius: 12px; background: #fff;
    padding: 12px; display: grid; gap: 10px;
    grid-template-columns: minmax(0, 1fr) auto auto auto;
    align-items: end; /* drop zone, length and copies boxes share one bottom line */
}
.updtf-row .updtf-file { min-width: 0; }

.updtf-drop {
    display: flex; align-items: center; justify-content: center; gap: 8px;
    border: 2px dashed var(--sh-line); border-radius: 10px; padding: 8px 12px;
    min-height: 60px; /* label (18) + gap (3) + input (39) of the neighbouring fields */
    color: var(--sh-muted); cursor: pointer; text-align: center; font-size: 14.5px;
    transition: border-color .15s, background .15s;
}
.updtf-drop:hover, .updtf-drop.drag { border-color: var(--sh-teal); background: #f0fbfa; color: var(--sh-navy); }
.updtf-drop input[type=file] { display: none; }

.updtf-chip { display: flex; align-items: center; gap: 9px; min-width: 0; min-height: 60px; }
.updtf-chip .ico { font-size: 22px; }
.updtf-chip .nm { font-weight: 600; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; min-width: 0; }
.updtf-chip .sz { color: var(--sh-muted); font-size: 12.5px; white-space: nowrap; }

.updtf-len, .updtf-copies { display: flex; flex-direction: column; gap: 3px; font-size: 12px; color: var(--sh-muted); }
.updtf-len input, .updtf-copies input {
    width: 92px; padding: 9px 10px; border: 1px solid var(--sh-line); border-radius: 8px; font: inherit; font-size: 15px;
}
.updtf-copies .stepper { display: flex; align-items: center; }
.updtf-copies .stepper button {
    width: 32px; height: 38px; border: 1px solid var(--sh-line); background: #fff; cursor: pointer; font-size: 17px;
    color: var(--sh-navy); border-radius: 8px 0 0 8px; line-height: 1;
}
.updtf-copies .stepper button + input { border-radius: 0; border-left: 0; border-right: 0; width: 58px; text-align: center; }
.updtf-copies .stepper button:last-child { border-radius: 0 8px 8px 0; }
.updtf-len input:focus-visible, .updtf-copies input:focus-visible { outline: none; border-color: var(--sh-teal); box-shadow: 0 0 0 3px rgba(0, 183, 173, .2); }

.updtf-len .src { font-size: 11px; font-weight: 600; }
.updtf-len .src.auto { color: #047857; }
.updtf-len .src.manual { color: #c2410c; }

.updtf-rowend { display: flex; flex-direction: column; align-items: flex-end; gap: 6px; }
.updtf-rowtotal { font-weight: 700; white-space: nowrap; }
.updtf-x {
    border: 0; background: none; color: var(--sh-muted); cursor: pointer; font-size: 19px; line-height: 1; padding: 2px 6px;
    border-radius: 6px;
}
.updtf-x:hover { color: #b91c1c; background: #fee2e2; }

.updtf-addrow { width: 100%; margin: 0 0 18px; }

/* ---- summary ---- */
.updtf-summary { border: 1px solid var(--sh-line); border-radius: 12px; background: #fff; padding: 14px 16px; margin: 0 0 12px; }
.updtf-summary .row { display: flex; justify-content: space-between; gap: 12px; padding: 4px 0; }
.updtf-summary .row.big { font-size: 20px; border-top: 1px solid var(--sh-line); margin-top: 8px; padding-top: 10px; color: var(--sh-teal); }
.updtf-summary .row.big b { font-weight: 800; }
.updtf-note { font-size: 12.5px; margin-top: 4px; }

.updtf-rush { display: flex; align-items: center; gap: 9px; padding: 9px 0 4px; cursor: pointer; font-weight: 600; }
.updtf-rush input { width: 17px; height: 17px; accent-color: var(--sh-orange); }
.updtf-rush small { color: var(--sh-muted); font-weight: 400; }
.updtf-rushrow b { color: var(--sh-orange); }

.updtf-warn { background: #fff7ed; border: 1px solid #fed7aa; color: #9a3412; border-radius: 10px; padding: 10px 13px; font-size: 14px; }
.updtf-err { background: #fef2f2; border: 1px solid #fecaca; color: #b91c1c; border-radius: 10px; padding: 10px 13px; font-size: 14px; }

.updtf-cta { width: 100%; font-size: 17px; padding: 14px 26px; }

/* ---- instructions / tiers / features ---- */
.updtf-instructions { margin: 18px 0 0; border: 1px solid var(--sh-line); border-radius: 12px; background: #fff; padding: 12px 16px; }
.updtf-instructions summary { font-weight: 700; cursor: pointer; }
.updtf-instructions ol { margin: 10px 0 4px; padding-left: 20px; }
.updtf-instructions li { margin: 0 0 8px; }

.updtf-tiers { margin: 18px 0 0; }
.updtf-tiers h3 { margin: 0 0 8px; font-size: 16px; }
.updtf-tiers table { width: 100%; border-collapse: collapse; background: #fff; border: 1px solid var(--sh-line); border-radius: 12px; overflow: hidden; }
.updtf-tiers td { padding: 8px 13px; border-bottom: 1px solid var(--sh-line); }
.updtf-tiers tr:last-child td { border-bottom: 0; }
.updtf-tiers tr.on td { background: #f0fbfa; color: var(--sh-teal); }
.updtf-tiers .right { text-align: right; }

.updtf-features { display: grid; grid-template-columns: repeat(auto-fill, minmax(150px, 1fr)); gap: 12px; margin: 20px 0 0; }
.updtf-feature { display: flex; flex-direction: column; align-items: center; gap: 8px; text-align: center; font-size: 13px; color: var(--sh-navy); font-weight: 600; }
.updtf-feature img { width: 52px; height: 52px; }

/* ---- upload modal ---- */
dialog.updtf-modal { border: 0; border-radius: 16px; padding: 0; width: min(480px, calc(100vw - 28px)); box-shadow: 0 24px 60px rgba(0, 25, 59, .35); }
dialog.updtf-modal::backdrop { background: rgba(0, 17, 40, .55); backdrop-filter: blur(2px); }
.updtf-modal-head { display: flex; align-items: center; padding: 16px 20px; border-bottom: 1px solid var(--sh-line); }
.updtf-modal-head h2 { margin: 0; font-size: 18px; flex: 1; }
.updtf-modal-x { border: 0; background: none; font-size: 21px; cursor: pointer; color: var(--sh-muted); padding: 2px 6px; border-radius: 6px; }
.updtf-modal-x:hover { background: #f3f4f6; color: var(--sh-navy); }
.updtf-modal-body { padding: 16px 20px; }
.updtf-modal-foot { display: flex; gap: 10px; justify-content: flex-end; padding: 0 20px 18px; flex-wrap: wrap; }

.updtf-prog-list { display: flex; flex-direction: column; gap: 5px; margin: 0 0 12px; max-height: 200px; overflow: auto; }
.updtf-prog-item { display: flex; justify-content: space-between; gap: 10px; font-size: 13.5px; }
.updtf-prog-item .st { white-space: nowrap; color: var(--sh-muted); }
.updtf-prog-item.done .st { color: #047857; }
.updtf-prog-item.err .st { color: #b91c1c; }
.updtf-prog-bar { height: 10px; border-radius: 6px; background: #eef2f7; overflow: hidden; }
.updtf-prog-fill { height: 100%; width: 0; background: var(--sh-teal); transition: width .2s; }
.updtf-prog-label { margin-top: 7px; font-size: 13px; }

/* ---- mobile ---- */
@media (max-width: 640px) {
    .updtf-row { grid-template-columns: 1fr 1fr; }
    .updtf-row .updtf-file { grid-column: 1 / -1; }
    .updtf-rowend { grid-column: 1 / -1; flex-direction: row; justify-content: space-between; align-items: center; }
    .updtf-len input { width: 100%; }
    .updtf-len, .updtf-copies { width: 100%; }
    .updtf-copies .stepper { width: 100%; }
    .updtf-copies .stepper input { flex: 1; width: auto; }
}

.updtf-warn b a { color: inherit; text-decoration: underline; white-space: nowrap; cursor: pointer; }
.updtf-warn b a:hover { color: #7c2d12; }

/* compact gallery for the upload configurator page — the form is the hero, not the photo */
.prod-gallery--compact { max-width: 400px; margin: 0 auto; width: 100%; }
.prod-gallery--compact .prod-thumbs { justify-content: center; }
@media (max-width: 720px) {
    .prod-gallery--compact { max-width: 300px; }
}
