.disk-file-selector {
    display: flex;
    align-items: center;
    gap: 10px;
    margin-bottom: 10px;
}

.disk-file-info {
    flex: 1;
    padding: 5px 10px;
    border: 1px solid #ddd;
    border-radius: 3px;
    background: #f9f9f9;
}

.disk-file-preview {
    margin-bottom: 10px;
}

.disk-file-preview a {
    color: #2067B0;
    text-decoration: none;
}

.disk-file-preview a:hover {
    text-decoration: underline;
}

.file-input {
    position: relative;
}

.webform-field-upload-list {
    margin: 0 0 10px;
    padding: 0;
    list-style: none;
}

.webform-field-upload-list-single {
    margin-bottom: 5px;
}

.webform-field-upload-list li {
    position: relative;
    margin-bottom: 5px;
    white-space: nowrap;
    padding: 0 0 0 20px;
}

.webform-field-upload-list li.saved-file {
    padding-right: 30px;
    DISPLAY: FLEX;
    align-items: center;
}

.webform-field-upload-list li.saved-file .ui-icon {
    margin-right: 15px;
}

.webform-field-upload-list li .file-name {
    color: #0b66c3;
    overflow: hidden;
    text-overflow: ellipsis;
    display: inline-block;
    max-width: calc(100% - 20px);
    vertical-align: middle;
}

.webform-field-upload-list li .file-name a {
    color: #0b66c3;
    text-decoration: none;
}

.webform-field-upload-list li .file-name a:hover {
    text-decoration: underline;
}

.webform-field-upload-list li .delete-file {
    position: absolute;
    right: 0;
    top: 0;
    bottom: 0;
    width: 16px;
    cursor: pointer;
    opacity: 0.6;
    background: url('data:image/svg+xml;charset=US-ASCII,%3Csvg%20xmlns%3D%22http%3A//www.w3.org/2000/svg%22%20width%3D%2212%22%20height%3D%2212%22%3E%3Cpath%20fill%3D%22%23535C69%22%20fill-rule%3D%22evenodd%22%20d%3D%22M7.692%205.99l3.839%203.84a1.207%201.207%200%201%201-1.705%201.705l-3.838-3.84-3.838%203.84a1.207%201.207%200%201%201-1.705-1.705l3.838-3.84L.444%202.15A1.207%201.207%200%201%201%202.15.445l3.838%203.84L9.826.444a1.207%201.207%200%201%201%201.705%201.705L7.692%205.99z%22/%3E%3C/svg%3E') no-repeat center;
}

.webform-field-upload-list li .delete-file:hover {
    opacity: 1;
}

.webform-field-upload {
    display: inline-block;
    vertical-align: top;
    position: relative;
}

/* Стиль для скрытия инпута файла */
.webform-field-upload input[type="file"] {
    width: 0.1px;
    height: 0.1px;
    opacity: 0;
    position: absolute;
    left: -1000px;
}


.webform-small-button:hover {
    background: #f6f8f9;
    border-color: #d8e0e5;
}

.webform-small-button:active {
    background: #d9e1e6;
    border-color: #d8e0e5;
}

.webform-button-upload, .webform-button-replace {
    display: inline-block;
}

/* Стили для кастомного компонента выбора файла из диска */

/* Общие стили для контейнера */
.diskfile-field-item {
    display: block;
    width: 100%;
}

/* Стили для списка файлов */
.diskfile-upload-list {
    list-style: none;
    margin: 0;
    padding: 0;
    margin-bottom: 10px;
}

/* Стили для элемента списка файлов */
.diskfile-item {
    position: relative;
    margin-bottom: 5px;
    padding: 8px 10px;
    border-radius: 3px;
    background-color: #f5f5f5;
}

/* Стили для контейнера элемента списка */
.diskfile-item-wrap {
    display: flex;
    align-items: center;
}

/* Стили для иконки файла */
.diskfile-icon {
    display: inline-block;
    width: 24px;
    height: 24px;
    margin-right: 10px;
    position: relative;
    background-color: #eef2f4;
    border-radius: 2px;
    overflow: hidden;
}

.diskfile-icon img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

/* Стили для имени файла */
.diskfile-name {
    font-size: 14px;
    color: #2067b0;
    text-decoration: none;
    margin-right: 10px;
    flex: 1;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

/* Стили для размера файла */
.diskfile-size {
    font-size: 12px;
    color: #7d7d7d;
    margin-right: 10px;
}

/* Стили для кнопки удаления */
.diskfile-delete {
    display: inline-block;
    width: 16px;
    height: 16px;
    font-size: 16px;
    line-height: 16px;
    color: #999;
    cursor: pointer;
    text-align: center;
}

.diskfile-delete:hover {
    color: #d73a49;
}

/* Стили для контейнера кнопок */
.diskfile-upload {
    display: flex;
    align-items: center;
    margin-top: 5px;
}

/* Стили для разных типов файлов */
.diskfile-icon-doc, .diskfile-icon-docx {
    background-image: url('/bitrix/js/disk/images/files/doc.svg');
    background-repeat: no-repeat;
    background-position: center;
    background-size: 16px;
}

.diskfile-icon-pdf {
    background-image: url('/bitrix/js/disk/images/files/pdf.svg');
    background-repeat: no-repeat;
    background-position: center;
    background-size: 16px;
}

.diskfile-icon-xls, .diskfile-icon-xlsx {
    background-image: url('/bitrix/js/disk/images/files/xls.svg');
    background-repeat: no-repeat;
    background-position: center;
    background-size: 16px;
}

.diskfile-icon-ppt, .diskfile-icon-pptx {
    background-image: url('/bitrix/js/disk/images/files/ppt.svg');
    background-repeat: no-repeat;
    background-position: center;
    background-size: 16px;
}

.diskfile-icon-txt {
    background-image: url('/bitrix/js/disk/images/files/txt.svg');
    background-repeat: no-repeat;
    background-position: center;
    background-size: 16px;
}

.diskfile-icon-zip, .diskfile-icon-rar {
    background-image: url('/bitrix/js/disk/images/files/zip.svg');
    background-repeat: no-repeat;
    background-position: center;
    background-size: 16px;
}

/* Для оформления различных состояний (ховер, активный элемент и т.д.) */
.diskfile-item:hover {
    background-color: #eef2f4;
}

/* Стили для поля выбора файла из диска */
.diskfile-input {
    display: block;
    margin-bottom: 10px;
}

.diskfile-upload-list {
    list-style: none;
    margin: 0 0 10px;
    padding: 0;
}

.diskfile-item {
    margin-bottom: 10px;
    position: relative;
    background-color: #f5f5f5;
    border-radius: 4px;
    padding: 0;
}

.diskfile-item-wrap {
    display: flex;
    align-items: center;
    padding: 10px;
}

.diskfile-icon {
    flex-shrink: 0;
    width: 36px;
    height: 36px;
    margin-right: 10px;
    border-radius: 3px;
    background-color: #eef2f4;
    position: relative;
    background-position: center center;
    background-repeat: no-repeat;
    background-size: 24px;
}

.diskfile-icon img {
    width: 100%;
    height: 100%;
    border-radius: 3px;
    object-fit: cover;
}

/* Иконки для типов файлов */
.diskfile-icon-doc, .diskfile-icon-docx {
    background-image: url('/bitrix/js/disk/images/files/doc.svg');
}
.diskfile-icon-xls, .diskfile-icon-xlsx {
    background-image: url('/bitrix/js/disk/images/files/xls.svg');
}
.diskfile-icon-pdf {
    background-image: url('/bitrix/js/disk/images/files/pdf.svg');
}
.diskfile-icon-txt {
    background-image: url('/bitrix/js/disk/images/files/txt.svg');
}
.diskfile-icon-ppt, .diskfile-icon-pptx {
    background-image: url('/bitrix/js/disk/images/files/ppt.svg');
}
.diskfile-icon-zip, .diskfile-icon-rar, .diskfile-icon-7z {
    background-image: url('/bitrix/js/disk/images/files/zip.svg');
}
.diskfile-icon-jpg, .diskfile-icon-jpeg, .diskfile-icon-png, .diskfile-icon-gif {
    background-image: url('/bitrix/js/disk/images/files/image.svg');
}

.diskfile-name {
    flex-grow: 1;
    margin-right: 10px;
    font-size: 13px;
    color: #333;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    max-width: 200px;
}

.diskfile-size {
    color: #7d7d7d;
    margin-right: 10px;
    font-size: 12px;
    white-space: nowrap;
}

.diskfile-delete {
    cursor: pointer;
    color: #8f8f8f;
    font-size: 18px;
    line-height: 18px;
    width: 18px;
    height: 18px;
    text-align: center;
    transition: color 0.2s ease;
}

.diskfile-delete:hover {
    color: #f00;
}

.diskfile-upload {
    display: flex;
    align-items: center;
}

/* Стили для режима просмотра */
.diskfile-view-item {
    display: flex;
    align-items: center;
    margin-bottom: 5px;
}
.diskfile-view-item .diskfile-icon {
    width: 24px;
    height: 24px;
    margin-right: 10px;
    background-size: 16px;
}

/* Стили для скрытия технического поля ввода ID файла */
.field-wrap input[type="text"][id^="input_disk_"] {
    display: none;
}

/* Скрываем кнопку "Добавить" для множественных полей */
.field-wrap input[type="button"][value="Добавить"] {
    display: none;
}