/* Drop zone wrapper for all enhanced file inputs (see file_dropzone.js) */
.cm-file-drop {
    position: relative;
    display: block;
    width: 100%;
    min-height: 52px;
    margin-bottom: 1rem;
    border: 2px dashed rgba(255, 255, 255, 0.22);
    border-radius: 10px;
    background: rgba(0, 0, 0, 0.12);
    transition: border-color 0.15s ease, background 0.15s ease, box-shadow 0.15s ease;
    box-sizing: border-box;
}

.cm-file-drop:hover,
.cm-file-drop:focus-within {
    border-color: rgba(255, 255, 255, 0.38);
    background: rgba(0, 0, 0, 0.16);
}

.cm-file-drop.is-dragover {
    border-color: #c084fc;
    background: rgba(192, 132, 252, 0.12);
    box-shadow: 0 0 0 1px rgba(192, 132, 252, 0.35);
}

.cm-file-drop.is-error {
    border-color: #f87171;
    background: rgba(248, 113, 113, 0.08);
}

/* Recharge uses 14px spacing between fields */
.form-wrap .cm-file-drop {
    margin-bottom: 14px;
}

.cm-file-drop-native {
    position: absolute !important;
    inset: 0 !important;
    width: 100% !important;
    height: 100% !important;
    min-height: 52px !important;
    margin: 0 !important;
    padding: 0 !important;
    border: none !important;
    box-shadow: none !important;
    background: transparent !important;
    outline: none !important;
    opacity: 0 !important;
    cursor: pointer !important;
    z-index: 2 !important;
    font-size: 99px !important; /* improves click target in some browsers */
    line-height: 1 !important;
}

.cm-file-drop-visual {
    position: relative;
    z-index: 1;
    pointer-events: none;
    padding: 12px 14px;
    min-height: 52px;
    display: flex;
    flex-direction: column;
    justify-content: center;
    gap: 4px;
    box-sizing: border-box;
}

.cm-file-drop-hint {
    font-size: 0.82rem;
    color: rgba(255, 255, 255, 0.68);
    line-height: 1.35;
}

.cm-file-drop-filename {
    font-size: 0.8rem;
    color: #86efac;
    word-break: break-word;
}

.cm-file-drop.is-error .cm-file-drop-filename {
    color: #fecaca;
}

.cm-file-drop.has-file .cm-file-drop-hint {
    opacity: 0.88;
}

html[data-theme="light"] .cm-file-drop {
    border-color: rgba(15, 23, 42, 0.22);
    background: rgba(255, 255, 255, 0.55);
}

html[data-theme="light"] .cm-file-drop:hover,
html[data-theme="light"] .cm-file-drop:focus-within {
    border-color: rgba(15, 23, 42, 0.38);
}

html[data-theme="light"] .cm-file-drop-hint {
    color: rgba(15, 23, 42, 0.62);
}

html[data-theme="light"] .cm-file-drop-filename {
    color: #15803d;
}
