.field-attachment-upload {
    min-width: 0;
}

.input-attachment-upload {
    position: absolute;
    width: 0.0625rem;
    height: 0.0625rem;
    padding: 0;
    margin: -0.0625rem;
    overflow: hidden;
    clip: rect(0, 0, 0, 0);
    white-space: nowrap;
    border: 0;
}

.group-attachment-upload-actions {
    display: flex;
    align-items: center;
    flex-wrap: wrap;
    gap: 0.5rem;
}

.btn-attachment-upload-add,
.btn-attachment-upload-submit {
    display: inline-flex;
    align-items: center;
    gap: 0.375rem;
    line-height: 1;
    text-decoration: none;
}

.btn-attachment-upload-add {
    cursor: pointer;
}

.btn-attachment-upload-submit:disabled {
    cursor: not-allowed;
    opacity: 0.55;
}

.text-attachment-upload-help {
    margin: 0.375rem 0 0;
    color: var(--color-text-muted);
    font-size: 0.75rem;
    line-height: 1.4;
}

.error-attachment-upload {
    margin-top: 0.375rem;
}

.error-attachment-upload[hidden],
.list-attachment-upload-preview[hidden] {
    display: none;
}

.list-attachment-upload-preview {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(min(100%, 15rem), 1fr));
    gap: 0.5rem;
    margin-top: 0.625rem;
}

.card-attachment-upload-preview {
    display: grid;
    grid-template-columns: 3rem minmax(0, 1fr) 2rem;
    align-items: center;
    gap: 0.625rem;
    min-width: 0;
    padding: 0.5rem;
    border: 0.0625rem solid var(--color-border-subtle);
    border-radius: 0.375rem;
    background: var(--color-bg-light-gray);
}

.media-attachment-upload-preview {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 3rem;
    height: 3rem;
    overflow: hidden;
    border: 0.0625rem solid var(--color-border-neutral);
    border-radius: 0.25rem;
    background: var(--color-bg-white);
    color: var(--color-text-muted);
}

.image-attachment-upload-preview {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.icon-attachment-upload-preview {
    width: 1.25rem;
    height: 1.25rem;
}

.details-attachment-upload-preview {
    min-width: 0;
}

.name-attachment-upload-preview,
.meta-attachment-upload-preview {
    display: block;
    overflow-wrap: anywhere;
}

.name-attachment-upload-preview {
    color: var(--color-text-default);
    font-size: 0.75rem;
    font-weight: 600;
    line-height: 1.35;
}

.meta-attachment-upload-preview {
    margin-top: 0.125rem;
    color: var(--color-text-muted);
    font-size: 0.6875rem;
    line-height: 1.35;
}

.btn-attachment-upload-remove {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 2rem;
    height: 2rem;
    padding: 0;
    border: 0;
    border-radius: 0.25rem;
    background: transparent;
    color: var(--color-text-muted);
    cursor: pointer;
}

.btn-attachment-upload-remove:hover,
.btn-attachment-upload-remove:focus-visible {
    background: var(--color-bg-white);
    color: var(--color-text-default);
}

.btn-attachment-upload-remove [data-lucide] {
    width: 1rem;
    height: 1rem;
}
