@use '@/styles/breakpoints' as *;

.root {
    min-width: 0;
}

.uploadDragger {
    margin-bottom: 16px;

    :global(.ant-upload) {
        width: 100%;
        padding: 0 !important;
    }

    :global(.ant-upload-drag) {
        border-radius: 10px;
        border: 1px dashed color-mix(in srgb, var(--primary, #27132e) 28%, var(--border, #d9d9d9));
        background: color-mix(in srgb, var(--primary, #27132e) 3%, var(--surface, #fff));
        transition:
            border-color 0.15s ease,
            background 0.15s ease,
            box-shadow 0.15s ease;
    }

    :global(.ant-upload-drag:not(.ant-upload-disabled):hover) {
        border-color: color-mix(in srgb, var(--primary, #27132e) 45%, var(--border, #d9d9d9));
        background: color-mix(in srgb, var(--primary, #27132e) 6%, var(--surface, #fff));
        box-shadow: 0 2px 8px rgba(15, 12, 20, 0.05);
    }

    :global(.ant-upload-btn) {
        padding: 18px 16px !important;
    }
}

.uploadInner {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 10px;
    text-align: center;
    min-width: 0;
}

.uploadIconWrap {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 48px;
    height: 48px;
    border-radius: 10px;
    flex-shrink: 0;
    color: var(--primary, #27132e);
    background: color-mix(in srgb, var(--primary, #27132e) 12%, var(--surface, #fff));
}

.uploadCopy {
    min-width: 0;
}

.uploadTitle {
    margin: 0;
    font-size: 14px;
    font-weight: 600;
    line-height: 1.45;
    color: var(--text-default, rgba(0, 0, 0, 0.88));
}

.uploadHint {
    margin: 4px 0 0;
    font-size: 12px;
    line-height: 1.5;
    color: var(--text-subtle, rgba(0, 0, 0, 0.45));
}

.uploadDisabledReason {
    display: block;
    margin-bottom: 16px;
    font-size: 13px;
}

.loadingState {
    display: flex;
    align-items: center;
    justify-content: center;
    min-height: 120px;
    padding: 24px 16px;
}

.emptyState {
    min-height: 200px;
    padding: 28px 16px;
    margin-top: 4px;
}

@include max-mobile {
    .emptyState {
        min-height: 168px;
        padding: 24px 12px;
    }
}

.uploadingBar {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    margin-bottom: 12px;
    padding: 12px;
    border-radius: 10px;
    font-size: 13px;
    color: var(--primary, #27132e);
    background: color-mix(in srgb, var(--primary, #27132e) 6%, var(--surface, #fff));
}

.anexoList {
    :global(.ant-list-item) {
        align-items: flex-start;
        padding: 12px;
        margin-bottom: 8px;
        border-radius: 10px;
        border: 1px solid color-mix(in srgb, var(--border, #f0f0f0) 80%, transparent);
        background: var(--surface, #fff);
    }

    :global(.ant-list-item:last-child) {
        margin-bottom: 0;
    }

    :global(.ant-list-item-meta) {
        min-width: 0;
    }

    :global(.ant-list-item-meta-title) {
        margin-bottom: 2px !important;
    }

    :global(.ant-list-item-action) {
        margin-inline-start: 12px !important;
    }
}

@include max-mobile {
    .uploadDragger {
        margin-bottom: 12px;

        :global(.ant-upload-btn) {
            padding: 14px 12px !important;
            min-height: 44px;
        }
    }

    .uploadInner {
        flex-direction: row;
        align-items: center;
        gap: 12px;
        text-align: left;
    }

    .uploadIconWrap {
        width: 44px;
        height: 44px;
    }

    .uploadTitle {
        font-size: 13px;
    }

    .uploadHint {
        font-size: 11px;
        line-height: 1.4;
    }

    .anexoList {
        :global(.ant-list-item) {
            flex-wrap: wrap;
            gap: 8px;
            padding: 12px;
        }

        :global(.ant-list-item-meta) {
            flex: 1 1 100%;
            margin-inline-end: 0 !important;
        }

        :global(.ant-list-item-action) {
            margin-inline-start: 0 !important;
            margin-block-start: 0;
            width: 100%;
            padding-inline-start: 52px;

            > li {
                padding: 0;
            }

            :global(.ant-btn-link) {
                min-height: 36px;
                padding-inline: 8px;
                font-size: 13px;
            }
        }
    }
}
