/* File attachments on the enquiry and referral forms (upload.js). Classes prefixed up-. */
.up{margin:4px 0 18px}
.up-label{display:block;font-size:.85rem;font-weight:600;color:var(--navy);margin-bottom:8px}
.up-label i{font-style:normal;font-weight:400;color:var(--muted)}

/* The drop box. Always visible, so people can see they can drag files here before they start. */
.up-zone{position:relative;display:flex;flex-direction:column;align-items:center;justify-content:center;gap:6px;min-height:150px;padding:22px 18px;border:2px dashed #b7c2d1;border-radius:var(--radius);background:var(--soft);text-align:center;transition:border-color .2s,background-color .2s,box-shadow .2s,transform .2s}
.up-zone:hover,.up-zone:focus-within{border-color:var(--teal)}
.up-icon{width:34px;height:34px;color:var(--teal)}
.up-zone-text{margin:0;font-size:1rem;color:var(--navy)}
.up-pick{color:var(--teal);font-weight:600;text-decoration:underline;text-underline-offset:3px;cursor:pointer}
.up-pick input{position:absolute;width:1px;height:1px;opacity:0;overflow:hidden;clip:rect(0 0 0 0)}
.up-pick:focus-within{outline:2px solid var(--teal);outline-offset:3px;border-radius:3px}
.up-hint{margin:0;max-width:34rem;font-size:.82rem;line-height:1.45;color:var(--muted)}

/* Dragging files anywhere over the page: dim everything except the box, and make the box unmissable. */
.up-shade{position:fixed;inset:0;z-index:1000;background:rgba(17,32,58,.55);opacity:0;visibility:hidden;pointer-events:none;transition:opacity .2s,visibility 0s .2s}
.up-shade.is-on{opacity:1;visibility:visible;transition:opacity .2s}
.up-zone.is-armed{z-index:1001;border:3px dashed var(--teal);background:#fff;box-shadow:0 0 0 6px rgba(38,170,195,.25),0 18px 50px rgba(0,0,0,.25);animation:up-pulse 1.4s ease-in-out infinite}
.up-zone.is-over{border-style:solid;background:#e9f8fb;transform:scale(1.02);animation:none;box-shadow:0 0 0 8px rgba(38,170,195,.4),0 18px 50px rgba(0,0,0,.25)}
.up-drop{position:absolute;inset:0;display:flex;align-items:center;justify-content:center;border-radius:inherit;font-size:1.2rem;font-weight:600;color:var(--navy);background:inherit;opacity:0;pointer-events:none;transition:opacity .15s}
.up-zone.is-armed .up-drop{opacity:1}
.up-drop::before{content:"";width:28px;height:28px;margin-right:10px;background:currentColor;-webkit-mask:url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='black' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M12 3v12'/%3E%3Cpath d='m7 10 5 5 5-5'/%3E%3Cpath d='M5 21h14'/%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 24 24' fill='none' stroke='black' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M12 3v12'/%3E%3Cpath d='m7 10 5 5 5-5'/%3E%3Cpath d='M5 21h14'/%3E%3C/svg%3E") center/contain no-repeat}
@keyframes up-pulse{50%{box-shadow:0 0 0 12px rgba(38,170,195,.12),0 18px 50px rgba(0,0,0,.25)}}

/* Chosen files: a grid of thumbnails. */
.up-list{list-style:none;margin:14px 0 0;padding:0;display:grid;grid-template-columns:repeat(auto-fill,minmax(118px,1fr));gap:12px}
.up-list[hidden]{display:none}
.up-item{position:relative;display:flex;flex-direction:column;gap:6px;min-width:0;animation:up-in .25s ease-out}
.up-thumb{display:flex;align-items:center;justify-content:center;aspect-ratio:1;overflow:hidden;border:1px solid var(--line);border-radius:var(--radius);background:#1b2433}
.up-thumb img{width:100%;height:100%;object-fit:cover;display:block}
.up-thumb.is-file{background:var(--soft)}
.up-type{display:flex;flex-direction:column;align-items:center;justify-content:center;width:56%;aspect-ratio:3/4;border:2px solid #c3cddb;border-radius:4px 14px 4px 4px;background:#fff}
.up-type-ext{font-size:.72rem;font-weight:700;letter-spacing:.04em;color:var(--navy)}
.up-meta{display:flex;flex-direction:column;min-width:0;font-size:.8rem;line-height:1.3}
.up-name{overflow:hidden;white-space:nowrap;text-overflow:ellipsis;color:var(--navy)}
.up-size{color:var(--muted)}
.up-rm{position:absolute;top:6px;right:6px;display:flex;align-items:center;justify-content:center;width:26px;height:26px;padding:0;border:0;border-radius:50%;background:rgba(17,32,58,.78);color:#fff;font-size:18px;line-height:1;cursor:pointer}
.up-rm:hover,.up-rm:focus-visible{background:#b3261e;outline:0}
@keyframes up-in{from{opacity:0;transform:scale(.92)}}

.up-msg{margin:8px 0 0;color:#b3261e;font-size:.9rem}

@media (prefers-reduced-motion:reduce){
  .up-zone,.up-shade,.up-drop{transition:none}
  .up-zone.is-armed{animation:none}
  .up-zone.is-over{transform:none}
  .up-item{animation:none}
}
