/* Image Studio. Colours and type match the home page and Catalogue Studio. */
:root {
  font-family: Inter, "Segoe UI", system-ui, sans-serif;
  color: #0b2a33;
  background: #f5f8f7;
  --green: #0f6e74;
  --green-dark: #0a5459;
  --border: #d8e4e4;
  --muted: #56707a;
  --tint: #e2f0ef;
  --input: #c5d6d7;
}
* { box-sizing: border-box; }
body { margin: 0; }
button, input, select { font: inherit; }
a { color: var(--green); }
p { font-size: 14px; color: var(--muted); line-height: 1.6; margin: 7px 0; }
h1 { font-size: clamp(30px, 3.7vw, 45px); letter-spacing: -1.8px; font-weight: 650; line-height: 1.15; margin: 0 0 12px; }
h2 { font-size: 20px; letter-spacing: -.4px; margin: 0; display: flex; align-items: center; gap: 10px; }
strong { font-weight: 650; }
small { font-size: 12px; font-weight: 400; color: var(--muted); }
[hidden] { display: none !important; }
.muted { color: var(--muted); font-size: 13px; }
.sr-only, .file-input { position: absolute; width: 1px; height: 1px; overflow: hidden; opacity: 0; padding: 0; }

.mast { background: #0b2a33; color: white; padding: 20px max(24px, calc((100vw - 1180px) / 2)); display: flex; justify-content: space-between; align-items: center; gap: 15px; }
.brand { color: white; font-size: 16px; font-weight: 650; }
.brand a { color: white; text-decoration: none; }
.brand a:hover { text-decoration: underline; }
.brand > span { color: #8fb3b5; font-weight: 400; margin-left: 8px; }
.privacy { font-size: 12px; color: #8fb3b5; }

main { max-width: 1236px; padding: 34px 28px 28px; margin: auto; }
.heading { margin-bottom: 26px; }
.heading p { max-width: 640px; }
.card { background: #fff; border: 1px solid var(--border); border-radius: 13px; margin: 0 0 22px; padding: 24px; box-shadow: 0 3px 12px #203b2c03; }
.section-heading { display: flex; justify-content: space-between; align-items: center; gap: 14px; flex-wrap: wrap; margin-bottom: 18px; }
.step { display: inline-grid; place-items: center; width: 26px; height: 26px; border-radius: 50%; background: var(--tint); color: var(--green); font-size: 13px; letter-spacing: 0; }
.hint { font-size: 12px; margin: 12px 0 0; }

button, .button { border: 1px solid var(--input); background: #fff; border-radius: 8px; color: #1d3d47; padding: 10px 15px; cursor: pointer; font-size: 13px; font-weight: 600; display: inline-flex; align-items: center; justify-content: center; text-decoration: none; }
button:hover:not(:disabled), .button:hover { background: #e8f3f2; border-color: #5b9ea1; }
button:disabled { opacity: .45; cursor: not-allowed; }
.primary { background: var(--green); border-color: var(--green); color: white; }
.primary:hover:not(:disabled) { background: var(--green-dark); color: white; }
.quiet { background: transparent; }
.small { padding: 5px 9px; font-size: 12px; }
input, select { width: 100%; min-width: 0; background: #fff; border: 1px solid var(--input); border-radius: 7px; padding: 10px 11px; color: #1f3a44; font-size: 14px; height: 42px; }
input[type=checkbox], input[type=radio] { width: auto; height: auto; accent-color: var(--green); margin: 3px 0 0; }
input[type=range] { padding: 0; border: 0; height: 28px; accent-color: var(--green); }
input[type=color] { padding: 3px; width: 56px; cursor: pointer; }
input:focus, select:focus, button:focus-visible, .drop:focus-within, a:focus-visible { outline: 2px solid #1a8389; outline-offset: 2px; }
label { font-size: 13px; font-weight: 600; display: grid; gap: 7px; align-content: start; }

/* Step 1 */
.drop { border: 1.5px dashed #9fc2c4; background: #f4f9f9; border-radius: 11px; padding: 34px 20px; display: grid; justify-items: center; gap: 6px; text-align: center; cursor: pointer; }
.drop strong { font-size: 16px; }
.drop > span:not(.button) { font-size: 13px; font-weight: 400; color: var(--muted); }
.drop .button { margin-top: 8px; }
.drop.dragging { border-color: var(--green); background: var(--tint); }
.totals { font-size: 13px; color: var(--muted); margin: 16px 0 10px; }
.table-wrap { overflow: auto; border: 1px solid var(--border); border-radius: 8px; max-height: 420px; }
table { border-collapse: collapse; width: 100%; font-size: 13px; text-align: left; }
th { position: sticky; top: 0; font-weight: 600; color: #5a737c; background: #f1f6f6; font-size: 11px; text-transform: uppercase; letter-spacing: .5px; white-space: nowrap; }
th, td { padding: 9px 12px; border-bottom: 1px solid #e5eded; vertical-align: middle; }
tr:last-child td { border-bottom: 0; }
tr.selected, tr.selected td { background: #f1f7f7; }
.file-name { font-weight: 600; overflow-wrap: anywhere; }
.row-note { display: block; font-size: 11px; color: var(--muted); margin-top: 3px; line-height: 1.4; }
.row-note.error { color: #a7372b; }
td.num { white-space: nowrap; color: #455d66; }
.row-actions { display: flex; gap: 6px; justify-content: flex-end; }
.status { display: inline-block; font-size: 11px; font-weight: 650; border-radius: 99px; padding: 2px 9px; white-space: nowrap; background: #edf1f1; color: var(--muted); }
.status.done { background: var(--tint); color: var(--green); }
.status.processing { background: #e8f0fb; color: #2a5a9a; }
.status.failed, .status.invalid { background: #fff0eb; color: #983d2b; }

/* Step 2 */
.fields { display: grid; grid-template-columns: 1.2fr 1fr 1.2fr; gap: 16px; align-items: start; }
.fields:has(#custom-size[hidden]) { grid-template-columns: 1fr 1fr; }
.pair { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; }
.choices { border: 0; padding: 0; margin: 22px 0 0; display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 10px; }
.choices.compact { grid-template-columns: minmax(0, 1fr) minmax(0, 1fr) minmax(0, 1.2fr); }
legend { font-size: 13px; font-weight: 600; margin-bottom: 9px; padding: 0; }
.choice { display: flex; gap: 10px; border: 1px solid var(--border); border-radius: 9px; padding: 12px 14px; cursor: pointer; font-weight: 400; }
.choice:has(input:checked) { border-color: var(--green); background: var(--tint); }
.choice span { font-size: 12px; color: var(--muted); line-height: 1.5; }
.choice strong { display: block; color: #0b2a33; font-size: 13px; margin-bottom: 2px; }
.compression-input { align-self: center; }
#quality-value { font-weight: 650; color: var(--green); }
.row { display: flex; flex-wrap: wrap; gap: 14px 30px; align-items: center; margin-top: 20px; }
.inline-fields { display: flex; gap: 18px; align-items: center; flex-wrap: wrap; }
.colour { display: flex; align-items: center; gap: 10px; }
.check { display: flex; align-items: flex-start; gap: 8px; font-weight: 500; }
.check small { margin-left: 4px; }
.suffix { max-width: 280px; margin-top: 20px; }
.summary { margin-top: 18px; padding: 12px 16px; background: #e8f3f2; border-radius: 8px; color: #0a5459; font-size: 13px; }
.validation, #notice { padding: 12px 16px; border-radius: 8px; background: #fff0eb; color: #983d2b; font-size: 13px; line-height: 1.6; margin: 12px 0 0; }
#notice { margin: 0 0 18px; background: #e2f0ef; color: #0a5459; }
#notice[data-error=true] { background: #fff0eb; color: #983d2b; }

/* Step 3 */
.compare { display: grid; grid-template-columns: 1fr 1fr; gap: 20px; }
figure { margin: 0; }
figcaption { font-size: 12px; font-weight: 650; text-transform: uppercase; letter-spacing: .5px; color: var(--muted); margin-bottom: 8px; }
.frame { --frame-height: 340px; background: #edf2f2; border: 1px solid var(--border); border-radius: 10px; height: var(--frame-height); display: flex; align-items: center; justify-content: center; padding: 12px; overflow: hidden; }
.frame img { max-width: 100%; max-height: calc(var(--frame-height) - 26px); object-fit: contain; display: block; box-shadow: 0 2px 10px #173a2920; }
.checker { background-color: #fff; background-image: linear-gradient(45deg, #e6eced 25%, transparent 25%), linear-gradient(-45deg, #e6eced 25%, transparent 25%), linear-gradient(45deg, transparent 75%, #e6eced 75%), linear-gradient(-45deg, transparent 75%, #e6eced 75%); background-size: 16px 16px; background-position: 0 0, 0 8px, 8px -8px, -8px 0; }
#before-info, #after-info { font-size: 13px; }

/* Step 4 */
.actions { display: flex; gap: 10px; flex-wrap: wrap; }
.progress { display: flex; align-items: center; gap: 14px; margin-top: 18px; font-size: 13px; color: var(--muted); }
progress { flex: 1; max-width: 520px; height: 10px; accent-color: var(--green); }
.downloads { margin-top: 18px; padding-top: 16px; border-top: 1px solid var(--border); }
.downloads p { color: #0b2a33; }


/* Two-column layout (see shared/site.css): narrower settings column */
.workspace-main .fields, .workspace-main .fields:has(#custom-size[hidden]) { grid-template-columns: 1fr; }
.workspace-main #custom-size { grid-column: 1 / -1; }
.workspace-main .choices, .workspace-main .choices.compact { grid-template-columns: 1fr; gap: 8px; }
.workspace-main .compression-input { margin-top: 4px; }
.process-actions { justify-content: flex-start; margin-top: 20px; padding-top: 18px; border-top: 1px solid var(--border); }
.process-actions .primary { padding: 12px 22px; font-size: 14px; }
.empty-state { background: var(--tint); border-radius: 11px; padding: 22px 24px; }
.empty-state strong { display: block; font-size: 16px; color: var(--green-dark); }
.empty-state p { color: var(--green-dark); margin: 4px 0 0; }
.workspace-side .progress { margin: 0 0 16px; }
.workspace-side .downloads { margin: 0 0 18px; padding: 14px 16px; border: 0; background: var(--tint); border-radius: 10px; }
.workspace-side .downloads p { margin-top: 0; }
.subhead { display: flex; align-items: baseline; gap: 10px; flex-wrap: wrap; margin-bottom: 10px; }
.subhead h3 { font-size: 15px; margin: 0; }
.workspace-side .compare { gap: 14px; }
.workspace-side .frame { --frame-height: 200px; }
.list-head { display: flex; justify-content: space-between; align-items: center; gap: 10px; margin-bottom: 8px; }
.list-head:not(:has(:not([hidden]))) { display: none; }
.list-head .totals { margin: 0; color: var(--green-dark); font-weight: 600; }
/* Photo list in step 1: one compact block per photo, with a thumbnail, instead of six table columns */
.photo-list { max-height: 320px; margin-bottom: 12px; }
.photo-list thead { display: none; }
.photo-list table, .photo-list tbody { display: block; }
.photo-list tr { display: grid; grid-template-columns: minmax(0, 1fr) auto auto; gap: 2px 12px; align-items: center; padding: 8px 12px; border-bottom: 1px solid #e5eded; }
.photo-list tr:last-child { border-bottom: 0; }
.photo-list td { display: block; padding: 0; border: 0; }
.photo-list td:nth-child(1) { grid-column: 1; grid-row: 1 / 3; display: flex; gap: 10px; align-items: center; min-width: 0; }
.photo-list td:nth-child(2), .photo-list td:nth-child(3), .photo-list td:nth-child(4) { display: none; }
.photo-list td:nth-child(5) { grid-column: 2; grid-row: 1 / 3; }
.photo-list td:nth-child(6) { grid-column: 3; grid-row: 1 / 3; }
.thumb { width: 40px; height: 40px; flex: none; object-fit: cover; border-radius: 6px; background: #edf2f2; border: 1px solid var(--border); }
.photo-meta { min-width: 0; display: grid; }
.photo-meta .file-name { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.photo-meta .row-sub { font-size: 12px; color: var(--muted); }
/* Once photos are added, the drop area becomes a slim "Add more photos" row under the list */
.drop.has-photos { padding: 12px 16px; grid-template-columns: auto; justify-items: start; }
.drop.has-photos > strong, .drop.has-photos > span:not(.button) { display: none; }
.drop.has-photos .button { margin: 0; }
.drop.has-photos .button::before { content: "+\00a0"; }

@media (max-width: 900px) {
  .fields, .fields:has(#custom-size[hidden]), .workspace-main .fields, .workspace-main .fields:has(#custom-size[hidden]) { grid-template-columns: 1fr; }
  .choices, .choices.compact { grid-template-columns: 1fr; }
}
@media (max-width: 800px) {
  main { padding: 25px 16px; }
  .card { padding: 18px; }
  .privacy { display: none; }
  .compare { grid-template-columns: 1fr; }
  .frame { --frame-height: 260px; }
  th:nth-child(3), td:nth-child(3) { display: none; }
}
@media (max-width: 480px) {
  .photo-list tr { grid-template-columns: minmax(0, 1fr) auto; }
  .photo-list td:nth-child(1) { grid-column: 1; grid-row: 1; }
  .photo-list td:nth-child(5) { grid-column: 2; grid-row: 1; }
  .photo-list td:nth-child(6) { grid-column: 1 / -1; grid-row: 2; margin-top: 4px; }
  h1 { font-size: 32px; letter-spacing: -1.2px; }
  .row-actions { justify-content: flex-start; }
}

.brand { display: flex; align-items: center; }
.logo { display: inline-flex; border-radius: 4px; }
.logo img { display: block; height: 32px; width: auto; }
.brand a.logo:hover { text-decoration: none; opacity: .85; }

/* Dropdowns: our own chevron with room around it, instead of the browser's arrow squeezed against the edge */
select { -webkit-appearance: none; appearance: none; padding-right: 40px; background-color: #fff; background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='8' viewBox='0 0 12 8'%3E%3Cpath d='M1 1.5l5 5 5-5' fill='none' stroke='%23476357' stroke-width='1.8' stroke-linecap='round' stroke-linejoin='round'/%3E%3C/svg%3E"); background-repeat: no-repeat; background-position: right 15px center; background-size: 12px 8px; cursor: pointer; text-overflow: ellipsis; }
select:hover { border-color: #5b9ea1; }
/* "optional" and other notes sit on the same line as the field name, so fields side by side line up */
label > span small { margin-left: 4px; font-weight: 400; }
/* Radio buttons in the choice cards: fixed size so they stay round */
.choice { align-items: flex-start; }
.choice input[type=radio] { flex: none; width: 16px; height: 16px; margin: 2px 0 0; }
.choice input[type=radio]:focus { outline-offset: 2px; border-radius: 50%; }

/* Size-change highlight cards in the results column */
.highlights { display: grid; grid-template-columns: repeat(auto-fit, minmax(190px, 1fr)); gap: 10px; margin-top: 16px; }
.hl { border: 1px solid var(--border); border-radius: 11px; padding: 12px 14px 13px; background: #fff; }
.hl p { margin: 0; }
.hl-label { font-size: 12px; font-weight: 650; color: #0b2a33; }
.hl-sizes { font-size: 22px; font-weight: 700; letter-spacing: -.5px; color: #0b2a33; line-height: 1.25; margin: 3px 0 8px !important; }
.hl-badge { display: inline-block; font-size: 12px; font-weight: 700; border-radius: 99px; padding: 3px 10px; background: #cdebe6; color: #0a5459; }
.hl-badge[data-tone=larger] { background: #fcebd3; color: #7a4308; }
.hl-badge[data-tone=same] { background: #edf1f1; color: #455d66; }
.hl-res { font-size: 12px !important; color: var(--muted) !important; margin-top: 8px !important; line-height: 1.5; }
