/* Send us files (assets/file-drop.js, WEB-0469). The site's look: white page, grey tiles, an ink pill for the one action, violet
   for a quiet link. Uses the theme's tokens where they exist and plain values where they do not. Phone first. */

.hp-drop { --c-ink: var(--wp--preset--color--ink, #1D1D1F); --c-body: var(--wp--preset--color--body, #3A3A3E); --c-quiet: var(--wp--preset--color--quiet, #6E6E73); --c-line: var(--wp--preset--color--line, #E8E8ED); --c-line-strong: var(--wp--preset--color--line-strong, #D2D2D7); --c-tile: var(--wp--preset--color--tile, #F5F5F7); --c-surface: var(--wp--preset--color--surface, #fff); --c-brand: var(--wp--preset--color--brand-deep, #5B46C7); --c-soft: var(--wp--preset--color--brand-soft, #EDE9FC); --c-good: var(--wp--preset--color--good, #2F7D4F); --c-danger: #B4394C; /* the theme's danger a shade deeper, for small text on the grey tile */ --ease: cubic-bezier(0.2, 0.7, 0.2, 1); color: var(--c-ink); margin: 0 auto; }
.hp-drop.hp-drop { max-width: 46rem; } /* doubled so it outranks the block layout's width rule on the page that holds the shortcode */
.hp-drop *, .hp-drop *::before, .hp-drop *::after { box-sizing: border-box; }
.hp-drop [hidden] { display: none !important; }
.hp-drop button { -webkit-tap-highlight-color: transparent; }
.hp-drop button:focus-visible, .hp-drop a:focus-visible, .hp-drop input:focus-visible, .hp-drop textarea:focus-visible { outline: 2px solid var(--c-brand); outline-offset: 2px; }
.hp-drop__sr, .hp-drop__file { position: absolute !important; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); clip-path: inset(50%); white-space: nowrap; }
/* The honeypot: off the page, out of reach, never read out. */
.hp-drop__trap { position: absolute !important; left: -10000px; top: auto; width: 1px; height: 1px; overflow: hidden; }

.hp-drop__card { animation: hp-drop-in 360ms var(--ease) both; }
@keyframes hp-drop-in { from { opacity: 0; transform: translateY(10px); } to { opacity: 1; transform: none; } }

/* The head: a short headline and the line under it. */
.hp-drop__head { text-align: center; margin-bottom: 2.5rem; }
.hp-drop__title { font-size: clamp(2rem, 1.3rem + 2.8vw, 3.25rem); font-weight: 700; letter-spacing: -0.025em; line-height: 1.08; color: var(--c-ink); margin: 0; outline: none; }
.hp-drop__lede { color: var(--c-quiet); font-size: 1.1rem; line-height: 1.5; max-width: 36rem; margin: 0.9rem auto 0; }
.hp-drop__notice { background: var(--c-soft); color: var(--c-ink); border-radius: 14px; padding: 0.8rem 1.1rem; margin: 1.5rem auto 0; max-width: 36rem; font-size: 0.95rem; line-height: 1.45; text-align: left; }

/* Buttons: the theme's pill, since .wp-element-button does not reach inside the app. */
.hp-drop__button { display: inline-flex; align-items: center; justify-content: center; min-height: 44px; font: inherit; font-size: 1rem; font-weight: 500; line-height: 1.2; color: #fff; background: var(--c-ink); border: 0; border-radius: 999px; padding: 0.85rem 1.5rem; cursor: pointer; text-decoration: none; text-align: center; white-space: nowrap; transition: background-color 160ms var(--ease), transform 160ms var(--ease), opacity 160ms var(--ease); }
.hp-drop__button:hover { background: var(--c-brand); color: #fff; transform: translateY(-1px); }
.hp-drop__button:disabled { opacity: 0.4; transform: none; cursor: default; background: var(--c-ink); }
.hp-drop__quiet { display: inline-flex; align-items: center; min-height: 44px; background: none; border: 0; padding: 0; font: inherit; font-size: 0.95rem; font-weight: 500; color: var(--c-brand); cursor: pointer; text-decoration: none; }
.hp-drop__quiet:hover { text-decoration: underline; text-underline-offset: 0.2em; }
.hp-drop__quiet:disabled { color: var(--c-quiet); cursor: default; text-decoration: none; opacity: 0.6; }

/* Name and email, side by side on a wide screen. */
.hp-drop__form { display: grid; gap: 1.5rem; }
.hp-drop__who { display: grid; grid-template-columns: 1fr; gap: 1rem; }
@media (min-width: 640px) { .hp-drop__who { grid-template-columns: 1fr 1fr; } }
.hp-drop__field { display: grid; gap: 0.35rem; align-content: start; }
.hp-drop__label { font-size: 0.85rem; font-weight: 500; color: var(--c-ink); }
.hp-drop__input { width: 100%; font: inherit; font-size: 1.05rem; color: var(--c-ink); background: var(--c-surface); border: 1px solid var(--c-line-strong); border-radius: 12px; padding: 0.85rem 1rem; min-height: 48px; transition: border-color 160ms var(--ease), box-shadow 160ms var(--ease); }
.hp-drop__input:focus { outline: none; border-color: var(--c-ink); box-shadow: 0 0 0 3px var(--c-soft); }
.hp-drop__input[aria-invalid="true"] { border-color: var(--c-danger); }
.hp-drop__field-error { margin: 0; min-height: 0; font-size: 0.85rem; color: var(--c-danger); }
.hp-drop__field-error:empty { display: none; }
.hp-drop__as { grid-column: 1 / -1; margin: 0; text-align: center; color: var(--c-body); font-size: 1rem; }

/* The drop zone: a grey tile that takes the files; compact once files are in. */
.hp-drop__zone { display: grid; justify-items: center; gap: 0.5rem; text-align: center; background: var(--c-tile); border: 2px dashed transparent; border-radius: 24px; padding: 2.75rem 1.25rem 2.25rem; cursor: pointer; transition: border-color 160ms var(--ease), background-color 160ms var(--ease), padding 200ms var(--ease); }
.hp-drop__zone.is-over { border-color: var(--c-brand); background: var(--c-soft); }
.hp-drop__zone-icon { width: 3.25rem; height: 3.25rem; color: var(--c-quiet); margin-bottom: 0.35rem; }
.hp-drop__zone-icon svg { width: 100%; height: 100%; display: block; }
.hp-drop__hint { margin: 0; color: var(--c-quiet); font-size: 0.95rem; }
.hp-drop__types { margin: 0.6rem 0 0; color: var(--c-quiet); font-size: 0.85rem; line-height: 1.5; max-width: 30rem; }
@media (hover: none) { .hp-drop__hint--drag { display: none; } }
@media (hover: hover) { .hp-drop__hint--touch { display: none; } }
/* Once files are in: smaller, the button beside its words on a wide screen, above them on a phone. */
.hp-drop__zone.is-compact { padding: 1.1rem 1.1rem 1rem; border-radius: 20px; }
.hp-drop__zone.is-compact .hp-drop__zone-icon { display: none; }
.hp-drop__zone.is-compact .hp-drop__types { margin: 0; font-size: 0.8rem; }
@media (min-width: 640px) {
  .hp-drop__zone.is-compact { grid-template-columns: auto 1fr; justify-items: start; align-items: center; text-align: left; padding: 0.85rem 1.1rem; gap: 0.1rem 1rem; }
  .hp-drop__zone.is-compact .hp-drop__button { grid-row: 1 / span 3; }
}

/* A row per file: its type, its name and size, a thin bar, where it stands, and what can be done with it. */
.hp-drop__list { list-style: none; margin: 0; padding: 0; display: grid; gap: 0.6rem; }
.hp-drop__list:empty { display: none; }
.hp-drop__item { display: grid; grid-template-columns: auto minmax(0, 1fr); gap: 0.25rem 1rem; align-items: start; background: var(--c-tile); border-radius: 20px; padding: 1rem 1.1rem; animation: hp-drop-in 280ms var(--ease) both; }
@media (min-width: 640px) { .hp-drop__item { grid-template-columns: auto minmax(0, 1fr) auto; padding: 1rem 1.25rem; } }
.hp-drop__ext { display: grid; place-items: center; width: 2.75rem; height: 3.25rem; border-radius: 10px; background: var(--c-surface); color: var(--c-quiet); font-size: 0.68rem; font-weight: 700; letter-spacing: 0.04em; box-shadow: inset 0 0 0 1px var(--c-line); }
.hp-drop__main { min-width: 0; display: grid; gap: 0.45rem; padding-top: 0.15rem; }
.hp-drop__line { display: flex; align-items: baseline; gap: 0.75rem; min-width: 0; }
.hp-drop__name { font-weight: 600; font-size: 1rem; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.hp-drop__size { flex: none; color: var(--c-quiet); font-size: 0.85rem; font-variant-numeric: tabular-nums; }
.hp-drop__bar { height: 4px; border-radius: 999px; background: rgba(29, 29, 31, 0.1); overflow: hidden; }
.hp-drop__fill { display: block; height: 100%; width: 0; border-radius: 999px; background: var(--c-ink); transition: width 300ms var(--ease), background-color 300ms var(--ease); }
.hp-drop__item[data-state="checking"] .hp-drop__fill { background: var(--c-brand); }
.hp-drop__item[data-state="received"] .hp-drop__fill { background: var(--c-good); }
.hp-drop__item[data-state="failed"] .hp-drop__fill { background: var(--c-danger); }
.hp-drop__state { margin: 0; font-size: 0.88rem; line-height: 1.45; color: var(--c-quiet); font-variant-numeric: tabular-nums; }
.hp-drop__item[data-state="received"] .hp-drop__state { color: var(--c-good); font-weight: 500; }
.hp-drop__item[data-state="received"] .hp-drop__state::before { content: ""; display: inline-block; width: 0.95em; height: 0.95em; margin-right: 0.35em; vertical-align: -0.12em; background: currentColor; -webkit-mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 20 20'%3E%3Cpath d='M4 10.5l4 4 8-9' fill='none' stroke='%23000' stroke-width='2.4' stroke-linecap='round' stroke-linejoin='round'/%3E%3C/svg%3E") center / contain no-repeat; mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 20 20'%3E%3Cpath d='M4 10.5l4 4 8-9' fill='none' stroke='%23000' stroke-width='2.4' stroke-linecap='round' stroke-linejoin='round'/%3E%3C/svg%3E") center / contain no-repeat; }
.hp-drop__item[data-state="rejected"] .hp-drop__state, .hp-drop__item[data-state="refused"] .hp-drop__state, .hp-drop__item[data-state="failed"] .hp-drop__state { color: var(--c-danger); }
.hp-drop__item[data-state="rejected"] .hp-drop__name, .hp-drop__item[data-state="refused"] .hp-drop__name { color: var(--c-quiet); }
.hp-drop__acts { grid-column: 2; display: flex; flex-wrap: wrap; gap: 0 1.25rem; margin-top: -0.35rem; }
@media (min-width: 640px) { .hp-drop__acts { grid-column: 3; grid-row: 1; margin-top: 0; justify-content: flex-end; align-self: start; } }
.hp-drop__note { display: grid; gap: 0.35rem; margin-top: 0.25rem; }
.hp-drop__message { min-height: 4.75rem; resize: vertical; font-size: 1rem; line-height: 1.45; }
.hp-drop__left { font-size: 0.8rem; color: var(--c-quiet); }
.hp-drop__left:empty { display: none; }

/* Send: the one filled button; why it waits, in a line under it. */
.hp-drop__send { display: grid; justify-items: center; gap: 0.6rem; margin-top: 0.5rem; text-align: center; }
.hp-drop__send-button { min-width: 12rem; }
.hp-drop__why { margin: 0; color: var(--c-quiet); font-size: 0.9rem; min-height: 1.3em; }
.hp-drop__error { margin: 0; color: var(--c-danger); font-size: 0.95rem; max-width: 34rem; }
.hp-drop__error:empty { display: none; }
@media (max-width: 639px) { .hp-drop__send-button { width: 100%; } }

/* A screen that is one sentence: thank you, the link has ended, uploads are paused. */
.hp-drop__card--only { text-align: center; padding: 1rem 0 2rem; }
.hp-drop__actions { display: flex; flex-wrap: wrap; justify-content: center; align-items: center; gap: 0.75rem 1.75rem; margin: 2rem 0 0; }

@media (prefers-reduced-motion: reduce) {
  .hp-drop__card, .hp-drop__item { animation: none; }
  .hp-drop__fill, .hp-drop__zone, .hp-drop__button, .hp-drop__input { transition: none; }
  .hp-drop__button:hover { transform: none; }
}
