/* Merati engraving - artwork drop zone.
   Low-specificity and token-light so the Bijoux theme's type and colour come through. */

.merati-engraving__label {
    display: block;
    margin-bottom: .35em;
    font-size: .85em;
}

/* The real input stays in the DOM and focusable - the label is the visible target, so
   clicking it opens the picker natively and keyboard users keep the normal control. */
.merati-engraving__file {
    position: absolute;
    width: 1px;
    height: 1px;
    padding: 0;
    margin: -1px;
    overflow: hidden;
    clip: rect(0 0 0 0);
    clip-path: inset(50%);
    white-space: nowrap;
    border: 0;
}

.merati-engraving__drop {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: .3em;
    padding: 1.4em 1em;
    border: 1px dashed rgba(0, 0, 0, .28);
    border-radius: 4px;
    text-align: center;
    cursor: pointer;
    margin: 0;
    transition: border-color .15s ease, background-color .15s ease;
}

.merati-engraving__drop:hover {
    border-color: rgba(0, 0, 0, .5);
}

.merati-engraving__drop.is-dragover {
    border-color: currentColor;
    border-style: solid;
    background: rgba(0, 0, 0, .04);
}

.merati-engraving__drop.is-invalid {
    border-color: #b3261e;
}

/* Focusing the hidden input should visibly ring the label that stands in for it. */
.merati-engraving__file:focus-visible + .merati-engraving__drop {
    outline: 2px solid currentColor;
    outline-offset: 2px;
}

.merati-engraving__drop-main {
    font-size: .9em;
}

.merati-engraving__browse {
    text-decoration: underline;
}

/* --- chosen file ------------------------------------------------------- */

.merati-engraving__file-info {
    display: flex;
    align-items: center;
    gap: .75em;
    padding: .6em .75em;
    border: 1px solid rgba(0, 0, 0, .15);
    border-radius: 4px;
}

.merati-engraving__file-info[hidden] {
    display: none;
}

.merati-engraving__file-thumb {
    width: 44px;
    height: 44px;
    object-fit: cover;
    border-radius: 3px;
    flex: 0 0 auto;
}

.merati-engraving__file-meta {
    display: flex;
    flex-direction: column;
    min-width: 0;
    flex: 1 1 auto;
    line-height: 1.3;
}

.merati-engraving__file-name {
    font-size: .85em;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.merati-engraving__file-size {
    font-size: .75em;
    opacity: .6;
}

.merati-engraving__file-remove {
    flex: 0 0 auto;
    padding: .3em .7em;
    font: inherit;
    font-size: .78em;
    background: none;
    border: 1px solid rgba(0, 0, 0, .2);
    border-radius: 3px;
    cursor: pointer;
}

.merati-engraving__file-remove:hover {
    border-color: currentColor;
}

.merati-engraving__file-error {
    margin: .5em 0 0;
    font-size: .78em;
    color: #b3261e;
}

.merati-engraving__file-error[hidden] {
    display: none;
}

@media (prefers-reduced-motion: reduce) {
    .merati-engraving__drop { transition: none; }
}
