/* demo-setup/app-custom/entelai-upload.css
 *
 * Study upload UI overrides + bottom-right widget.
 * Designed to ride on top of entelai-oe2.css's Agent One palette.
 */

/* ── Modal body ──────────────────────────────────────────────────────── */
.eu-modal-body {
    display: flex;
    flex-direction: column;
    gap: 12px;
    padding: 16px 20px 20px;
    color: #FFFFFF;
    font-family: 'Manrope', 'Inter', system-ui, sans-serif;
    font-size: 14px;
}

.eu-drop {
    border: 2px dashed rgba(255, 255, 255, 0.18);
    border-radius: 10px;
    padding: 28px 16px;
    text-align: center;
    cursor: pointer;
    transition: border-color 120ms, background 120ms;
}
.eu-drop:hover, .eu-drop:focus { border-color: rgba(255, 255, 255, 0.35); outline: none; }
.eu-drop--over { border-color: var(--ao-accent, #0DE4C4); background: rgba(13, 228, 196, 0.06); }
.eu-drop-pick  { color: var(--ao-accent, #0DE4C4); text-decoration: underline; }
.eu-drop-msg   { color: #FFFFFF; }

/* ── Aggregate header (shared with widget) ───────────────────────────── */
.eu-aggregate {
    display: flex;
    flex-direction: column;
    gap: 6px;
    padding: 10px 12px;
    background: rgba(255, 255, 255, 0.04);
    border-radius: 8px;
}
.eu-agg-row1, .eu-agg-row2 { display: flex; justify-content: space-between; align-items: center; }
.eu-agg-pct  { font-size: 18px; font-weight: 700; }
.eu-agg-count { font-size: 12px; color: #A6A7B0; }
.eu-agg-bar  { height: 6px; background: rgba(255, 255, 255, 0.08); border-radius: 3px; overflow: hidden; }
.eu-agg-bar-fill { height: 100%; background: var(--ao-accent, #0DE4C4); transition: width 120ms linear; }
.eu-agg-eta  { font-size: 12px; color: #A6A7B0; }
.eu-cancel-all {
    background: transparent; border: none;
    color: var(--ao-accent, #0DE4C4);
    cursor: pointer; font-family: inherit; font-size: 12px; padding: 0;
}
.eu-cancel-all:hover { text-decoration: underline; }

/* ── File-list rows (shared with widget) ─────────────────────────────── */
.eu-list {
    max-height: 360px;
    overflow-y: auto;
    display: flex;
    flex-direction: column;
    gap: 4px;
}
.eu-row {
    display: grid;
    grid-template-columns: 1fr 120px 80px 84px;
    gap: 10px;
    align-items: center;
    padding: 6px 8px;
    border-radius: 6px;
    background: rgba(255, 255, 255, 0.03);
}
.eu-row { font-size: 12px; }
.eu-row-name   { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.eu-row-bar    { height: 4px; border-radius: 2px; background: rgba(255, 255, 255, 0.08); overflow: hidden; }
.eu-row-bar-fill { height: 100%; background: var(--ao-accent, #0DE4C4); transition: width 80ms linear; }
.eu-row-status { font-size: 12px; color: #A6A7B0; text-align: right; }
.eu-row-action { display: flex; gap: 4px; justify-content: flex-end; align-items: center; }
.eu-row--done .eu-row-status     { color: #4ade80; }
.eu-row--error .eu-row-status    { color: #f87171; }
.eu-row--canceled .eu-row-status { color: rgba(230, 230, 234, 0.45); }

.eu-x {
    background: rgba(255, 255, 255, 0.08);
    color: rgba(230, 230, 234, 0.9);
    border: none; border-radius: 50%;
    width: 22px; height: 22px;
    font-size: 14px; line-height: 1;
    cursor: pointer; padding: 0;
}
.eu-x:hover { background: rgba(255, 255, 255, 0.18); }
.eu-retry {
    background: transparent;
    border: 1px solid rgba(255, 255, 255, 0.25);
    color: var(--ao-accent, #00c2ff);
    border-radius: 4px; padding: 2px 8px;
    font-size: 11px; cursor: pointer; font-family: inherit;
}
.eu-retry:hover { border-color: var(--ao-accent, #0DE4C4); }

.eu-actions {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 8px;
    margin: 4px -20px -20px;
    padding: 16px 20px;
    border-top: 1px solid var(--ao-dark-1, #030D19);
}
.eu-subir {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
    background: transparent;
    color: var(--ao-accent, #0DE4C4);
    border: 1px solid var(--ao-accent, #0DE4C4);
    padding: 8px 24px;
    border-radius: 40px;
    font-family: inherit;
    font-size: 16px;
    font-weight: 500;
    line-height: normal;
    text-transform: uppercase;
    cursor: pointer;
    transition: background 0.2s, color 0.2s, box-shadow 0.2s;
}
.eu-subir:disabled { opacity: 0.45; cursor: not-allowed; }
.eu-subir:hover:not(:disabled) {
    background: var(--ao-accent, #0DE4C4);
    color: var(--ao-dark-1, #030D19);
    box-shadow: 0 0 8px 0 var(--ao-accent, #0DE4C4);
}
.eu-cancelar {
    background: transparent;
    border: none;
    color: var(--ao-accent, #0DE4C4);
    padding: 8px 0;
    font-family: inherit;
    font-size: 16px;
    font-weight: 500;
    line-height: normal;
    text-transform: uppercase;
    cursor: pointer;
}
.eu-cancelar:hover { text-decoration: underline; }

/* ── Widget (bottom-right) ───────────────────────────────────────────── */
.eu-widget {
    position: fixed;
    right: 16px; bottom: 16px;
    width: 361px;
    max-width: calc(100vw - 32px);
    background: var(--ao-dark-2, #1A232F);
    color: #FFFFFF;
    border: 1px solid rgba(255, 255, 255, 0.08);
    border-radius: 10px;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.45);
    font-family: 'Manrope', 'Inter', system-ui, sans-serif;
    font-size: 13px;
    z-index: 1100;
    overflow: hidden;
}
.eu-w-header {
    display: grid;
    grid-template-columns: 1fr auto auto auto;
    gap: 8px; align-items: center;
    padding: 10px 12px;
    background: rgba(255, 255, 255, 0.04);
}
.eu-w-title { font-size: 12px; font-weight: 700; line-height: 16px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.eu-w-pct   { font-size: 12px; color: #FFFFFF; }
.eu-w-toggle, .eu-w-close {
    background: transparent; border: none; cursor: pointer;
    color: #FFFFFF;
    font-size: 14px; padding: 2px 6px; line-height: 1;
}
.eu-w-toggle:hover, .eu-w-close:hover { color: var(--ao-accent, #0DE4C4); }
.eu-widget .eu-aggregate { background: transparent; padding: 8px 12px; }
.eu-w-list { max-height: 240px; padding: 4px 12px 12px; }

/* The full row layout (1fr 120px 80px 84px) is too wide for the 360px widget.
 * Hide the per-row progress bar inside the widget — the aggregate bar at the
 * top of the widget is the primary progress signal at this scale. */
.eu-widget .eu-row { grid-template-columns: 1fr 80px 84px; }
.eu-widget .eu-row-bar { display: none; }

.eu-pick-files, .eu-pick-folder { cursor: pointer; }
.eu-pick-files:hover, .eu-pick-folder:hover { filter: brightness(1.2); }

/* ── Fatal-error panel (atomic-strict: nothing uploaded → retry / close) ─ */
.eu-session-error {
    display: flex;
    flex-direction: column;
    gap: 8px;
    padding: 12px 14px;
    background: rgba(255, 89, 92, 0.08);
    border: 1px solid var(--ao-error, #FF595C);
    border-radius: 8px;
}
.eu-err-title { font-size: 14px; font-weight: 700; color: #FFFFFF; }
.eu-err-body  { font-size: 12px; color: #A6A7B0; }
.eu-err-actions {
    display: flex;
    justify-content: flex-end;
    align-items: center;
    gap: 12px;
    margin-top: 2px;
}
.eu-err-close {
    background: transparent;
    border: none;
    color: var(--ao-accent, #0DE4C4);
    font-family: inherit;
    font-size: 13px;
    font-weight: 500;
    text-transform: uppercase;
    cursor: pointer;
    padding: 6px 0;
}
.eu-err-close:hover { text-decoration: underline; }
.eu-err-retry {
    background: transparent;
    color: var(--ao-accent, #0DE4C4);
    border: 1px solid var(--ao-accent, #0DE4C4);
    padding: 6px 18px;
    border-radius: 40px;
    font-family: inherit;
    font-size: 13px;
    font-weight: 500;
    text-transform: uppercase;
    cursor: pointer;
    transition: background 0.2s, color 0.2s, box-shadow 0.2s;
}
.eu-err-retry:hover {
    background: var(--ao-accent, #0DE4C4);
    color: var(--ao-dark-1, #030D19);
    box-shadow: 0 0 8px 0 var(--ao-accent, #0DE4C4);
}

/* Canceling/reverting status text sits in the shared .eu-agg-eta slot. */
.eu-row--canceled .eu-row-name { opacity: 0.55; }
