/* =================================================================
   components/app-dropzone.css — Dropzone.js upload area
   -----------------------------------------------------------------
   Opt-in restyle of a Dropzone.js upload area in the table headers'
   grey: add app-dropzone next to the legacy classes, which Dropzone.js
   and file_upload.js keep using.

   The inner markup is Dropzone.js's own and stays untouched — its
   default-message element has had to be restored once already:
     <div class="dropzone dropzone_dashed_border app-dropzone" id="…">
         <div class="dz-default dz-message">
             <button class="dz-button" type="button">
                 Släpp dina filer här eller <a href="#">bläddra</a>
             </button>
         </div>
     </div>

   The component owns colours and the border width: 1px in every state, so nothing shifts on hover or
   drag. Resting size and padding still come from stylesheets/dropzone_customizations.css (legacy
   bundle, loaded first) and the page-scoped frames in overrides.css (panel, financial year, logo).

   Modifier:
     .app-dropzone--grow  grows to 200px while a file is dragged over it (legacy
                          behaviour); without it the area keeps its size

   States:
     :hover               darker border
     .dropzone_drag_over  focus-colour border, one grey step darker (file_upload.js toggles
                          it while a file is dragged over)
   ================================================================= */

/* ========== 1. SURFACE ========== */

/* The table headers' grey: app-table sets --bg-tertiary to --neutral-50, so match that token directly. */
.app-dropzone {
    border-width: 1px;
    border-color: var(--neutral-200);
    background: var(--neutral-50);
}

/* The legacy dashed variant thickens to 2px on hover; the colour change carries the state instead. */
.app-dropzone:hover {
    border-width: 1px;
    border-color: var(--neutral-400);
}

/* A file over the area must read differently from a hover: focus-colour border on one grey step darker. */
.app-dropzone.dropzone_drag_over {
    border-width: 1px;
    border-color: var(--color-focus-ring);
    background: var(--neutral-100);
}

/* The legacy drag-over rule grows the area to 200px; the dashed variant keeps its 50px resting height
   (dropzone_customizations.css). :where keeps this at (0,2,0) so page frames with their own height win. */
.app-dropzone.dropzone_drag_over:where(.dropzone_dashed_border) {
    min-height: 50px;
}

/* Opt-in: open up to the legacy 200px while dragging. Same weight as the rule above, later in the file. */
.app-dropzone--grow.dropzone_drag_over {
    min-height: 200px;
}

/* ========== 2. MESSAGE ========== */

/* The message is a hint: medium weight instead of dropzone_customizations.css's bold. */
.app-dropzone .dz-message {
    color: var(--text-secondary);
    font-weight: var(--font-weight-medium);
}

/* The browse link reads as part of the hint: text colour, underlined. A link with a class of its own
   (the Fortnox migration's migration_browse_link) keeps the page's styling. */
.app-dropzone .dz-message a:not([class]) {
    color: inherit;
    text-decoration: underline;
    text-decoration-thickness: 1px;
    text-underline-offset: 3px;
}

.app-dropzone .dz-message a:not([class]):hover {
    color: var(--text-primary);
}
