/* Drag-and-drop uploader for the carrier quote files field.
   Everything here is additive: without JavaScript the .dz-enhanced class is
   never applied and the plain <input type="file" multiple> shows through,
   so the page keeps working exactly as it did before. */

.dropzone {
    position: relative;
    margin-top: 4px;
}

/* --- Unenhanced (no JS): plain file input, prompt hidden --- */
.dropzone .dz-prompt { display: none; }

/* --- Enhanced: the real input becomes an invisible, still-focusable overlay --- */
.dropzone.dz-enhanced .dz-prompt { display: block; }

.dropzone.dz-enhanced {
    border: 2px dashed #c3c7d4;
    border-radius: 10px;
    background: #fbfcff;
    transition: border-color .15s ease, background-color .15s ease;
}

.dropzone.dz-enhanced .dz-input {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
    padding: 0;
    margin: 0;
    border: 0;
    opacity: 0;
    cursor: pointer;
}

/* Keyboard focus must be visible even though the input itself is transparent. */
.dropzone.dz-enhanced:focus-within {
    border-color: var(--navy);
    background: #f4f6ff;
    box-shadow: 0 0 0 3px rgba(32, 35, 96, .15);
}

.dropzone.dz-enhanced.is-dragover {
    border-color: var(--teal);
    background: #f0f8f6;
}

.dropzone.dz-enhanced.is-dragover .dz-icon { transform: translateY(-3px); }

.dz-prompt {
    padding: 30px 20px;
    text-align: center;
    pointer-events: none; /* clicks fall through to the overlaid input */
}

.dz-icon {
    display: block;
    margin: 0 auto 10px;
    color: var(--navy);
    opacity: .75;
    transition: transform .15s ease;
}

.dz-title { margin: 0; font-size: 15px; font-weight: 600; color: #222; }

.dz-title .dz-link {
    color: var(--navy);
    text-decoration: underline;
}

.dz-sub { margin: 6px 0 0; font-size: 12px; color: #777; }

/* The prompt repeats the format/limit guidance, so retire the server-rendered
   help line once the widget is live. It stays visible without JavaScript. */
.dropzone.dz-enhanced ~ .dz-quote-help { display: none; }

/* --- Selected file list --- */
.dz-list {
    list-style: none;
    margin: 12px 0 0;
    padding: 0;
}

.dz-list li {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 8px 10px;
    border: 1px solid #e2e2e2;
    border-radius: 6px;
    background: #fff;
    margin-bottom: 6px;
    font-size: 13px;
}

.dz-file-ext {
    flex: none;
    width: 42px;
    text-align: center;
    padding: 3px 0;
    border-radius: 3px;
    background: var(--navy);
    color: #fff;
    font-size: 10px;
    font-weight: 700;
    letter-spacing: .04em;
    text-transform: uppercase;
}

.dz-file-name {
    flex: 1 1 auto;
    min-width: 0;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.dz-file-size { flex: none; color: #777; font-size: 12px; }

.dz-remove {
    flex: none;
    margin: 0;
    padding: 2px 8px;
    background: transparent;
    color: #a11;
    border: 1px solid transparent;
    border-radius: 4px;
    font-size: 16px;
    line-height: 1.2;
    cursor: pointer;
}

.dz-remove:hover { background: #fbe1e1; border-color: #f3c9c9; }
.dz-remove:focus-visible { outline: 2px solid #a11; outline-offset: 1px; }

/* --- Footer row under the list: count + clear all --- */
.dz-meta {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    margin-top: 8px;
    font-size: 12px;
    color: #777;
}

.dz-meta:empty { display: none; }

.dz-clear {
    margin: 0;
    padding: 0;
    background: none;
    border: 0;
    color: var(--navy);
    font-size: 12px;
    text-decoration: underline;
    cursor: pointer;
}

/* --- Client-side validation messages (server errors still use .errorlist) --- */
.dz-errors {
    list-style: none;
    padding: 0;
    margin: 10px 0 0;
}

.dz-errors li {
    background: #fbe1e1;
    color: #a11;
    padding: 7px 12px;
    border-radius: 4px;
    margin-bottom: 6px;
    font-size: 13px;
}

/* --- Submit state: the pipeline runs synchronously and can take a while --- */
button[disabled] { opacity: .65; cursor: progress; }

.dz-submit-note {
    margin-left: 12px;
    font-size: 13px;
    color: #777;
}
