/**
 * File Upload Block Styles
 */

.bform-file-upload {
    margin-bottom: 20px;
}

.bform-file-dropzone {
    position: relative;
    border: 2px dashed #ccc;
    border-radius: 8px;
    padding: 40px 20px;
    text-align: center;
    cursor: pointer;
    transition: all 0.3s ease;
    background: #fafafa;
}

.bform-file-dropzone:hover,
.bform-file-dropzone.dragover {
    border-color: #0073aa;
    background: #f0f7fc;
}

.bform-file-dropzone.has-files {
    border-style: solid;
    border-color: #0073aa;
    background: #f0f7fc;
}

.bform-file-input {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    opacity: 0;
    cursor: pointer;
}

.bform-file-icon {
    color: #999;
    margin-bottom: 10px;
}

.bform-file-dropzone:hover .bform-file-icon,
.bform-file-dropzone.dragover .bform-file-icon {
    color: #0073aa;
}

.bform-file-text {
    font-size: 16px;
    color: #333;
    margin: 0 0 5px 0;
}

.bform-file-help {
    font-size: 12px;
    color: #666;
    margin: 0;
}

/* File list */
.bform-file-list {
    margin-top: 15px;
}

.bform-file-item {
    display: flex;
    align-items: center;
    padding: 10px 15px;
    background: #fff;
    border: 1px solid #ddd;
    border-radius: 4px;
    margin-bottom: 8px;
}

.bform-file-item-icon {
    width: 40px;
    height: 40px;
    margin-right: 12px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: #f5f5f5;
    border-radius: 4px;
    flex-shrink: 0;
}

.bform-file-item-icon img {
    max-width: 100%;
    max-height: 100%;
    border-radius: 2px;
}

.bform-file-item-icon svg {
    width: 24px;
    height: 24px;
    color: #e74c3c;
}

.bform-file-item-info {
    flex: 1;
    min-width: 0;
}

.bform-file-item-name {
    font-size: 14px;
    font-weight: 500;
    color: #333;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.bform-file-item-size {
    font-size: 12px;
    color: #666;
}

.bform-file-item-remove {
    background: none;
    border: none;
    color: #999;
    cursor: pointer;
    padding: 5px;
    margin-left: 10px;
    border-radius: 50%;
    transition: all 0.2s;
}

.bform-file-item-remove:hover {
    background: #fee;
    color: #e74c3c;
}

/* Error message */
.bform-file-error {
    color: #e74c3c;
    font-size: 13px;
    margin-top: 8px;
    display: none;
}

.bform-file-error.visible {
    display: block;
}

/* Editor preview */
.bform-file-upload-preview .bform-file-dropzone {
    pointer-events: none;
}
