/* File picker for the quote, contact and sticker forms (js/site.js "Files", functions/api/_files.js).
   One component, two skins: the white quote modal (.jm-box) and the dark contact / sticker forms
   (.fx-form). The native input stays in the page, visually hidden, so it keeps keyboard focus and
   its accessible name; the visible "Add photos or files" button is its label. Chosen files list
   under it with a remove button each; a second pick adds to the list. */

.fg-files { position: relative; min-width: 0; }  /* a long file name must never widen the form grid */
.fg-files .fg-files-input { position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px; overflow: hidden; clip: rect(0, 0, 0, 0); white-space: nowrap; border: 0; opacity: 0; }
.fg-files .fg-files-drop { display: flex; flex-wrap: wrap; align-items: center; gap: 10px 16px; padding: 14px 16px; border: 1.5px dashed #cfcfcf; border-radius: 8px; transition: border-color .2s ease, background-color .2s ease; }
.fg-files .fg-files-drop.is-over { border-color: #c4151c; background: #fbf3f3; }
.fg-files label.fg-files-btn {
  display: inline-flex; align-items: center; gap: 8px; min-height: 44px; margin: 0; padding: 10px 16px; border-radius: 8px; cursor: pointer;
  font-family: 'Archivo', sans-serif; font-size: 15px; font-weight: 600; line-height: 1.2; letter-spacing: normal; text-transform: none;
  color: #c4151c; background: #fff; border: 1.5px solid #c4151c; transition: background-color .18s ease, color .18s ease;
}
.fg-files label.fg-files-btn:hover { background: #c4151c; color: #fff; }
.fg-files label.fg-files-btn svg { flex: 0 0 auto; }
.fg-files .fg-files-input:focus-visible + label.fg-files-btn { outline: 2px solid #c4151c; outline-offset: 3px; }
.fg-files .fg-files-note { flex: 1 1 210px; margin: 0; font-family: 'Archivo', sans-serif; font-size: 13.5px; line-height: 1.5; color: #6b6b6b; text-wrap: pretty; }

.fg-files .fg-files-list { list-style: none; margin: 10px 0 0; padding: 0; }
.fg-files .fg-files-list li { display: flex; align-items: center; gap: 12px; padding: 6px 0; border-bottom: 1px solid #eeeeee; }
.fg-files .fg-files-list li:last-child { border-bottom: 0; }
.fg-files .fg-files-thumb { flex: 0 0 auto; width: 40px; height: 40px; border-radius: 6px; object-fit: cover; background: #f1f1f1; }
.fg-files .fg-files-kind { flex: 0 0 auto; width: 40px; height: 40px; border-radius: 6px; display: flex; align-items: center; justify-content: center; background: #f1f1f1; color: #555; font: 700 11px/1 'Archivo', sans-serif; letter-spacing: .02em; text-transform: uppercase; }
.fg-files .fg-files-name { flex: 1 1 auto; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; font-family: 'Archivo', sans-serif; font-size: 15px; color: #202020; }
.fg-files .fg-files-size { flex: 0 0 auto; font-family: 'Archivo', sans-serif; font-size: 13px; color: #6b6b6b; }
.fg-files .fg-files-remove { flex: 0 0 auto; width: 44px; height: 44px; margin: -4px -10px -4px 0; display: inline-flex; align-items: center; justify-content: center; padding: 0; border: 0; border-radius: 50%; background: none; color: #6b6b6b; cursor: pointer; transition: color .18s ease, background-color .18s ease; }
.fg-files .fg-files-remove:hover { color: #c4151c; background: #f5f1f1; }
.fg-files .fg-files-remove:focus-visible { outline: 2px solid #c4151c; outline-offset: 1px; }
.fg-files .fg-files-sum { margin: 6px 0 0; font-family: 'Archivo', sans-serif; font-size: 13px; color: #6b6b6b; }
.fg-files .fg-files-err { margin: 8px 0 0; font-family: 'Archivo', sans-serif; font-size: 14px; line-height: 1.5; color: #c0392b; }
.fg-files .fg-files-err p { margin: 0; }

/* Sending: a bar and a line under the files while they upload */
.fg-files .fg-files-progress { margin: 10px 0 0; }
.fg-files .fg-files-bar { height: 6px; border-radius: 3px; background: #eeeeee; overflow: hidden; }
.fg-files .fg-files-bar span { display: block; height: 100%; width: 0; background: #c4151c; transition: width .2s ease; }
.fg-files .fg-files-progress p { margin: 6px 0 0; font-family: 'Archivo', sans-serif; font-size: 13.5px; color: #6b6b6b; }

/* Dark forms (contact + sticker pages) */
.fx-form .fg-files .fg-files-drop { border: 2px dashed rgba(255, 255, 255, .3); background: rgba(16, 16, 16, .6); padding: 16px 18px; }
.fx-form .fg-files .fg-files-drop.is-over { border-color: var(--fx-red); background: rgba(237, 28, 36, .08); }
.fx-form .fg-files label.fg-files-btn { color: #fff; background: var(--fx-red-ink); border-color: var(--fx-red-ink); }
.fx-form .fg-files label.fg-files-btn:hover { background: var(--fx-red-dark); border-color: var(--fx-red-dark); color: #fff; }
.fx-form .fg-files .fg-files-input:focus-visible + label.fg-files-btn { outline-color: #fff; }
.fx-form .fg-files .fg-files-note, .fx-form .fg-files .fg-files-size, .fx-form .fg-files .fg-files-sum, .fx-form .fg-files .fg-files-progress p { color: var(--fx-muted); font-size: 14px; }
.fx-form .fg-files .fg-files-list li { border-bottom-color: rgba(255, 255, 255, .12); }
.fx-form .fg-files .fg-files-name { color: #fff; }
.fx-form .fg-files .fg-files-thumb, .fx-form .fg-files .fg-files-kind { background: rgba(255, 255, 255, .1); color: rgba(255, 255, 255, .85); }
.fx-form .fg-files .fg-files-remove { color: rgba(255, 255, 255, .72); }
.fx-form .fg-files .fg-files-remove:hover { color: #fff; background: rgba(255, 255, 255, .1); }
.fx-form .fg-files .fg-files-remove:focus-visible { outline-color: #fff; }
.fx-form .fg-files .fg-files-err { color: #ff8a8e; }
.fx-form .fg-files .fg-files-bar { background: rgba(255, 255, 255, .14); }
.fx-form .fg-files .fg-files-bar span { background: var(--fx-red); }

@media (prefers-reduced-motion: reduce) { .fg-files .fg-files-drop, .fg-files label.fg-files-btn, .fg-files .fg-files-remove, .fg-files .fg-files-bar span { transition: none; } }
.jm-box .jm-field label .fg-opt { color: #7a7a7a; font-weight: 400; letter-spacing: .02em; text-transform: none; }
