.comma-fu-wrapper {
    position: relative;
}

/* Dropzone — styled like a ff-el-form-control input */
.comma-fu-dropzone {
    border: 1px dashed var(--fluentform-border-color, #dadbdd);
    border-radius: var(--fluentform-border-radius, 7px);
    padding: 20px;
    text-align: center;
    background-clip: padding-box;
    background-image: none;
    transition: border-color 0.15s ease-in-out, box-shadow 0.15s ease-in-out;
    cursor: pointer;
}

.comma-fu-dropzone:hover,
.comma-fu-dropzone.comma-fu-dragover {
    border-color: var(--fluentform-primary, #1a7efb);
    background-color: rgba(26, 126, 251, 0.04);
}

/* Visually hidden file input */
.comma-fu-file-input {
    position: absolute;
    width: 1px;
    height: 1px;
    padding: 0;
    margin: -1px;
    overflow: hidden;
    clip: rect(0, 0, 0, 0);
    border: 0;
}

/* Button — matches ff_btn_style / ff-btn-primary */
.comma-fu-btn {
    display: inline-block;
    padding: 8px 20px;
    background-color: var(--fluentform-primary, #1a7efb);
    border: 1px solid var(--fluentform-primary, #1a7efb);
    color: #fff;
    border-radius: var(--fluentform-border-radius, 7px);
    cursor: pointer;
    font-size: 16px;
    font-weight: 500;
    line-height: 1.5;
    text-align: center;
    transition: background-color 0.15s ease-in-out, border-color 0.15s ease-in-out, box-shadow 0.15s ease-in-out;
    user-select: none;
    white-space: nowrap;
}

.comma-fu-btn:hover {
    opacity: 0.8;
    outline: 0;
    text-decoration: none;
}

/* Helper text below button */
.comma-fu-text {
    display: block;
    margin-top: 8px;
    font-size: 14px;
    color: var(--fluentform-secondary, #606266);
    line-height: inherit;
}

.comma-fu-hidden-input {
    display: none;
}

/* File list */
.comma-fu-file-list {
    margin-top: 8px;
}

.comma-fu-file-item {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 11px 15px;
    background: #fff;
    border: 1px solid var(--fluentform-border-color, #dadbdd);
    border-radius: var(--fluentform-border-radius, 7px);
    margin-bottom: 6px;
    font-size: 14px;
    line-height: 1;
    color: var(--fluentform-secondary, #606266);
    font-family: -apple-system, "system-ui", Segoe UI, Roboto, Oxygen-Sans, Ubuntu, Cantarell, Helvetica Neue, sans-serif;
}

.comma-fu-file-name {
    flex: 1;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
    color: var(--fluentform-secondary, #606266);
}

.comma-fu-file-size {
    color: var(--fluentform-secondary, #606266);
    opacity: 0.6;
    white-space: nowrap;
}

.comma-fu-remove {
    background: none;
    border: none;
    color: var(--fluentform-danger, #f56c6c);
    font-size: 18px;
    line-height: 1;
    cursor: pointer;
    padding: 0 4px;
    flex-shrink: 0;
    transition: opacity 0.15s;
}

.comma-fu-remove:hover {
    opacity: 0.7;
}

/* Progress bar */
.comma-fu-uploading {
    background: rgba(26, 126, 251, 0.04);
    border-color: var(--fluentform-primary, #1a7efb);
}

.comma-fu-progress {
    flex: 0 0 100px;
    height: 6px;
    background: var(--fluentform-border-color, #dadbdd);
    border-radius: 3px;
    overflow: hidden;
}

.comma-fu-progress-bar {
    display: block;
    height: 100%;
    width: 0;
    background: var(--fluentform-primary, #1a7efb);
    border-radius: 3px;
    transition: width 0.15s;
}

/* Error state — matches Fluent Forms validation error styling */
.ff-el-is-error .comma-fu-dropzone {
    border-color: var(--fluentform-danger, #f56c6c);
}
