/* Drop zones for file inputs, built by js/file-drop.js (see its header). Staff colours
   are the Tailwind gray/accent ramp the rest of the app uses; the tenant portal's
   Graphite look is at the bottom. */

.fd-zone {
  position: relative;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 4px;
  width: 100%;
  min-height: 104px;
  padding: 18px 16px;
  border: 1.5px dashed #d1d5db;
  border-radius: 12px;
  background: #fafbfb;
  color: #6b7280;
  font-size: 13px;
  line-height: 18px;
  text-align: center;
  transition: border-color .15s, background-color .15s;
}
.fd-zone:hover { border-color: rgb(127 184 192); background: rgb(230 241 242 / .45); }
.fd-zone:focus-within { border-color: rgb(47 127 136); box-shadow: 0 0 0 3px rgb(47 127 136 / .18); }

/* The real input, stretched invisibly over the whole box: a click anywhere opens the
   picker, focus and `required` still belong to a real file input. The !importants beat
   per-page input rules (widths, file: utilities) written before the box existed. */
.fd-zone > .fd-input {
  position: absolute !important;
  inset: 0 !important;
  width: 100% !important;
  max-width: none !important;
  height: 100% !important;
  margin: 0 !important;
  padding: 0 !important;
  opacity: 0 !important;
  cursor: pointer;
  font-size: 0;
}

.fd-icon { width: 26px; height: 26px; color: rgb(47 127 136); flex-shrink: 0; }
.fd-text { display: flex; flex-direction: column; align-items: center; gap: 2px; min-width: 0; pointer-events: none; }
.fd-zone strong { font-weight: 600; color: rgb(39 104 114); }
.fd-hint { font-size: 12px; color: #9ca3af; }
.fd-tap, .fd-release, .fd-busy-text { display: none; }
@media (hover: none) and (pointer: coarse) {
  .fd-title { display: none; }
  .fd-tap { display: inline; }
}

/* Something is being dragged over the page: show where it can land. */
.fd-dragging .fd-zone { border-color: rgb(127 184 192); background: rgb(230 241 242 / .45); }
.fd-zone.fd-over {
  border-style: solid;
  border-color: rgb(47 127 136);
  background: rgb(230 241 242);
}
.fd-zone.fd-over .fd-title,
.fd-zone.fd-over .fd-tap,
.fd-zone.fd-over .fd-hint { display: none; }
.fd-zone.fd-over .fd-release { display: inline; }

.fd-zone.fd-busy { border-style: solid; border-color: rgb(127 184 192); background: rgb(230 241 242 / .6); }
.fd-zone.fd-busy .fd-title,
.fd-zone.fd-busy .fd-tap,
.fd-zone.fd-busy .fd-release,
.fd-zone.fd-busy .fd-hint { display: none; }
.fd-zone.fd-busy .fd-busy-text { display: inline; }
.fd-zone.fd-busy .fd-icon { animation: fd-pulse 1s ease-in-out infinite alternate; }
@keyframes fd-pulse { from { opacity: 1; } to { opacity: .35; } }

/* One-line box for tight spots (tenant charge documents, bank CSV import). */
.fd-zone--sm { flex-direction: row; gap: 10px; min-height: 52px; padding: 10px 14px; border-radius: 10px; font-size: 12px; }
.fd-zone--sm .fd-icon { width: 20px; height: 20px; }
.fd-zone--sm .fd-text { flex-direction: row; flex-wrap: wrap; justify-content: center; column-gap: 8px; }
.fd-zone--sm .fd-hint { font-size: 11px; }

.fd-error { margin: 6px 0 0; font-size: 12px; color: #b91c1c; }

.fd-list { list-style: none; margin: 8px 0 0; padding: 0; display: flex; flex-direction: column; gap: 4px; }
.fd-file {
  display: flex; align-items: center; gap: 8px; min-width: 0;
  padding: 6px 8px 6px 10px; border: 1px solid #e5e7eb; border-radius: 8px; background: #fff;
  font-size: 12px; color: #374151;
}
.fd-file > svg { width: 16px; height: 16px; flex-shrink: 0; color: #9ca3af; }
.fd-name { min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.fd-size { flex-shrink: 0; color: #9ca3af; }
.fd-remove {
  margin-left: auto; flex-shrink: 0; display: inline-flex; padding: 3px; border: 0; border-radius: 6px;
  background: transparent; color: #9ca3af; cursor: pointer;
}
.fd-remove:hover { background: #f3f4f6; color: #374151; }
.fd-remove svg { width: 14px; height: 14px; }

/* A wider area that also takes drops (the attachments block, a bills-list row). */
[data-drop-area] { border-radius: 12px; transition: background-color .15s, box-shadow .15s; }
/* Room for the highlight without moving anything: the padding is taken back by the margin. */
div[data-drop-area] { margin: -8px; padding: 8px; }
.fd-area-over { box-shadow: 0 0 0 2px rgb(127 184 192); background: rgb(230 241 242 / .35); }
tr[data-drop-area] { border-radius: 0; }
tr.fd-area-over { box-shadow: none; }
tr.fd-area-over > td { background: rgb(230 241 242); box-shadow: inset 0 2px 0 rgb(47 127 136), inset 0 -2px 0 rgb(47 127 136); }
tr.fd-area-over > td:first-child { box-shadow: inset 2px 2px 0 rgb(47 127 136), inset 0 -2px 0 rgb(47 127 136); }
tr.fd-area-over > td:last-child { box-shadow: inset -2px 2px 0 rgb(47 127 136), inset 0 -2px 0 rgb(47 127 136); }
tr.fd-area-over [data-drop-row-label] { font-weight: 600; color: rgb(39 104 114); }

/* ---- Tenant portal (Graphite, portal.css) ------------------------------------------- */
.pt-app .fd-zone {
  flex: 1 1 260px;
  min-height: 112px;
  border-color: var(--pt-input);
  border-radius: 14px;
  background: var(--pt-surface-alt);
  color: var(--pt-muted);
  font-size: 14px;
  line-height: 20px;
}
.pt-app .fd-zone:hover,
.fd-dragging .pt-app .fd-zone { border-color: var(--pt-accent-border); background: var(--pt-accent-pale); }
.pt-app .fd-zone:focus-within { border-color: var(--pt-accent); box-shadow: 0 0 0 3px var(--pt-accent-pale); }
.pt-app .fd-zone.fd-over,
.pt-app .fd-zone.fd-busy { border-style: solid; border-color: var(--pt-accent); background: var(--pt-accent-pale); }
.pt-app .fd-icon { color: var(--pt-accent); }
.pt-app .fd-zone strong { color: var(--pt-accent-text); }
.pt-app .fd-hint { color: var(--pt-muted); font-size: 13px; }
.pt-app .fd-list, .pt-app .fd-error { flex-basis: 100%; }
.pt-app .fd-file { border-color: var(--pt-border); border-radius: 10px; font-size: 13px; color: var(--pt-text-2); }
