.order-extra-file {
    position: relative;
    width: 100%;
}

.order-extra-file__trigger,
.order-extra-file__meta,
.order-extra-file__list {
    display: none;
}

.order-extra-file--enhanced .order-extra-file__input {
    position: absolute !important;
    width: 1px !important;
    height: 1px !important;
    padding: 0 !important;
    overflow: hidden !important;
    clip: rect(0, 0, 0, 0) !important;
    clip-path: inset(50%) !important;
    white-space: nowrap !important;
    border: 0 !important;
    opacity: 0 !important;
    pointer-events: none !important;
}

.order-extra-file--enhanced .order-extra-file__trigger {
    display: flex;
    align-items: center;
    justify-content: flex-start;
    gap: 10px;
    box-sizing: border-box;
    width: 100%;
    min-height: 58px;
    padding: 14px 22px;
    color: var(--color-button-secondary-text, #2363d1);
    background: var(--color-button-secondary-background, #fff);
    border: 1px dashed var(--color-button-secondary-border, #b7cbe5);
    border-radius: 6px;
    font: inherit;
    font-size: 16px;
    font-weight: 600;
    text-align: left;
    cursor: pointer;
    transition: border-color 0.2s ease, background-color 0.2s ease, transform 0.2s ease;
}

.order-extra-file__trigger:hover {
    background: var(--colorless-buttons-hover-bg, #f3f6fb);
    border-color: currentColor;
}

.order-extra-file__trigger:active {
    transform: translateY(1px);
}

.order-extra-file__input:focus + .order-extra-file__trigger {
    outline: 2px solid currentColor;
    outline-offset: 3px;
}

.order-extra-file--enhanced .order-extra-file__meta {
    display: flex;
    gap: 16px;
    margin-top: 8px;
    color: #767676;
    font-size: 13px;
    line-height: 1.4;
}

.order-extra-file__meta span + span::before {
    content: "";
    display: inline-block;
    width: 3px;
    height: 3px;
    margin: 0 8px 3px 0;
    background: currentColor;
    border-radius: 50%;
}

.order-extra-file--enhanced .order-extra-file__list {
    display: grid;
    width: 100%;
    gap: 8px;
    margin-top: 12px;
}

.order-extra-file__list:empty {
    display: none;
}

.order-extra-file__item {
    display: grid;
    grid-template-columns: 38px minmax(0, 1fr) 34px;
    align-items: center;
    gap: 12px;
    box-sizing: border-box;
    width: 100%;
    min-width: 0;
    min-height: 54px;
    padding: 9px 10px;
    background: #f7f8fa;
    border: 1px solid #e1e4e8;
    border-radius: 6px;
}

.order-extra-file__pdf-icon {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 38px;
    height: 34px;
    color: #fff;
    background: #dc3545;
    border-radius: 4px;
    font-size: 10px;
    font-weight: 700;
    letter-spacing: 0.04em;
}

.order-extra-file__details {
    display: flex;
    min-width: 0;
    flex-direction: column;
    gap: 2px;
}

.order-extra-file__name {
    display: block;
    max-width: 100%;
    overflow: hidden;
    color: #262626;
    font-size: 14px;
    line-height: 1.35;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.order-extra-file__size {
    color: #767676;
    font-size: 12px;
}

.order-extra-file__remove {
    display: inline-flex;
    grid-column: 3;
    align-items: center;
    justify-content: center;
    justify-self: end;
    width: 34px;
    height: 34px;
    padding: 0;
    color: #767676;
    background: transparent;
    border: 0;
    border-radius: 50%;
    font-family: Arial, sans-serif;
    font-size: 26px;
    line-height: 1;
    cursor: pointer;
    transition: color 0.2s ease, background-color 0.2s ease;
}

.order-extra-file__remove:hover,
.order-extra-file__remove:focus-visible {
    color: #b4232f;
    background: #fbeaec;
    outline: none;
}

.order-extra-file__warning {
    padding: 9px 12px;
    color: #9d1c29;
    background: #fbeaec;
    border: 1px solid #f4c8cd;
    border-radius: 6px;
    font-size: 13px;
    line-height: 1.4;
}

@media (max-width: 575px) {
    .order-extra-file--enhanced .order-extra-file__trigger {
        min-height: 52px;
        padding: 12px 16px;
        font-size: 14px;
    }

    .order-extra-file__meta {
        flex-direction: column;
        gap: 2px;
    }

    .order-extra-file__meta span + span::before {
        display: none;
    }
}
