/**
 * Custom File Upload Styles for Gravity Forms
 */

/* Custom file upload wrapper */
.custom-file-upload-wrapper {
    margin-top: 10px;
    width: 100%;
}

/* Hide the file display area when empty */
.custom-file-display:empty {
    display: none;
}

/* File info container */
.custom-file-info {
    display: flex;
    align-items: center;
    background-color: #f8f9fa;
    border: 1px solid #e9ecef;
    border-radius: 6px;
    padding: 12px;
    margin-top: 10px;
}

/* File icon */
.file-icon {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 40px;
    height: 40px;
    background-color: #604DA6;
    color: white;
    border-radius: 4px;
    font-size: 12px;
    font-weight: bold;
    margin-right: 12px;
    flex-shrink: 0;
}

/* File details container */
.file-details {
    flex-grow: 1;
    overflow: hidden;
}

/* File name */
.file-name {
    font-weight: 500;
    margin-bottom: 4px;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

/* File metadata */
.file-meta {
    font-size: 12px;
    color: #6c757d;
}

/* Remove button */
.remove-file {
    background-color: #dc3545;
    border: none;
    color: white;
    cursor: pointer;
    font-size: 18px;
    line-height: 1;
    padding: 0;
    margin-left: 10px;
    display: flex;
    align-items: center;
    justify-content: center;
    width: 24px;
    height: 24px;
    transition: background-color 0.2s;
    position: relative;
    z-index: 10;
}

.remove-file:hover {
    background-color: #bd2130;
}

.remove-file span {
    position: relative;
    top: -1px;
}

/* Hide the default Gravity Forms file upload rules */
.gform_fileupload_rules {
    display: none;
}

/* Hide the default validation message when empty */
.validation_message--hidden-on-empty:empty {
    display: none;
}
