.corpsmart-ai-upload-wrapper {
    max-width: 480px;
    margin: 1em 0;
}

.corpsmart-ai-drop-zone {
    border: 2px dashed #b4b9be;
    border-radius: 20px;
    padding: 2em 1em;
    text-align: center;
    cursor: pointer;
    background: #fafafa;
    transition: border-color 0.15s ease, background-color 0.15s ease;
}

.corpsmart-ai-drop-zone:hover,
.corpsmart-ai-drop-zone.corpsmart-ai-drag-over {
    border-color: #2271b1;
    background: #f0f6fc;
}

.corpsmart-ai-drop-text {
    margin: 0;
    color: #50575e;
}

.corpsmart-ai-progress {
    text-align: center;
    padding: 1em 0;
}

.corpsmart-ai-progress-bar {
    height: 4px;
    background: linear-gradient(90deg, #2271b1 0%, #72aee6 50%, #2271b1 100%);
    background-size: 200% 100%;
    animation: corpsmart-ai-progress-animate 1.2s linear infinite;
    border-radius: 2px;
    margin-bottom: 0.5em;
}

@keyframes corpsmart-ai-progress-animate {
    0% { background-position: 200% 0; }
    100% { background-position: 0 0; }
}

.corpsmart-ai-results {
    margin-top: 1em;
}

.corpsmart-ai-result-json {
    background: #f6f7f7;
    border: 1px solid #dcdcde;
    border-radius: 20px;
    padding: 1em;
    overflow-x: auto;
    font-size: 12px;
}

.corpsmart-ai-result-error {
    color: #cc1818;
    background: #fcf0f1;
    border: 1px solid #cc1818;
    border-radius: 20px;
    padding: 0.75em 1em;
}

.corpsmart-ai-file-list {
    list-style: none;
    margin: 1em 0 0;
    padding: 0;
}

.corpsmart-ai-file-row {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 1em;
    padding: 0.5em 0.75em;
    margin-bottom: 0.4em;
    border-radius: 20px;
    border: 1px solid #dcdcde;
    background: #f6f7f7;
    font-size: 13px;
}

.corpsmart-ai-file-name {
    font-weight: 600;
    color: #1d2327;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.corpsmart-ai-file-status {
    color: #50575e;
    flex-shrink: 0;
}

.corpsmart-ai-file-row--pending .corpsmart-ai-file-status,
.corpsmart-ai-file-row--processing .corpsmart-ai-file-status {
    color: #2271b1;
}

.corpsmart-ai-file-row--successful {
    border-color: #68de7c;
    background: #edfaef;
}

.corpsmart-ai-file-row--successful .corpsmart-ai-file-status {
    color: #1a7d33;
}

.corpsmart-ai-file-row--failed {
    border-color: #cc1818;
    background: #fcf0f1;
}

.corpsmart-ai-file-row--failed .corpsmart-ai-file-status {
    color: #cc1818;
}

.corpsmart-ai-submit-disabled {
    opacity: 0.6;
    cursor: not-allowed;
}

.corpsmart-ai-existing-file-list {
    list-style: none;
    margin: 1em 0 0;
    padding: 0;
}

.corpsmart-ai-existing-file-row {
    padding: 0.4em 0.75em;
    margin-bottom: 0.3em;
    border-radius: 20px;
    border: 1px solid #dcdcde;
    background: #f6f7f7;
    font-size: 13px;
}

.corpsmart-ai-existing-file-row a {
    color: #2271b1;
    text-decoration: none;
    word-break: break-all;
}

.corpsmart-ai-existing-file-row a:hover {
    text-decoration: underline;
}

/* Existing-files rows hold the link plus its 'x' delete button, so the row
   itself becomes the flex container the link grows inside of. */
.corpsmart-ai-existing-file-row {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 0.75em;
}

.corpsmart-ai-existing-file-row a {
    flex: 1 1 auto;
}

.corpsmart-ai-existing-file-delete {
    flex: 0 0 auto;
    width: 1.5em;
    height: 1.5em;
    padding: 0;
    line-height: 1;
    font-size: 15px;
    color: #787c82;
    background: transparent;
    border: 1px solid transparent;
    border-radius: 50%;
    cursor: pointer;
}

.corpsmart-ai-existing-file-delete:hover,
.corpsmart-ai-existing-file-delete:focus {
    color: #cc1818;
    border-color: #cc1818;
    background: #fcf0f1;
}

.corpsmart-ai-existing-file-delete:disabled {
    opacity: 0.5;
    cursor: not-allowed;
}

.corpsmart-ai-existing-file-row--deleting {
    opacity: 0.6;
}

.corpsmart-ai-existing-file-notice {
    margin: 0.4em 0 0;
    color: #cc1818;
    font-size: 12px;
}
